Himel
Himel

Reputation: 195

Is there a way to overline text in (GitHub flavoured) Markdown?

I would like to overline some text in a Markdown file. Is this possible?

Upvotes: 9

Views: 21807

Answers (3)

glyvox
glyvox

Reputation: 58139

You can use the Combining Overline Unicode Character (U+0305) to simulate an overline, just paste this character after every character you want to overline:

̅

This produces the following result:

Alternatively, you can use a generator for this.

Upvotes: 8

Antonio
Antonio

Reputation: 275

According to the GitHub Flavored Markdown Spec (section 4.6) it should be possible using inline HTML tags with style.

For example,

<span style="text-decoration:overline">SIGNAL_ACTIVE_LOW</span>

should be rendered with the text overlined.

This works in a lot of markdown editors that adhere to CommonMark specs, and "GFM is a strict superset of CommonMark", but it seems don't works.

You can try in the CommonMark reference implementation.

enter image description here

UPDATE: It don't works in markdown files like "README.md", but works in GitHub Pages, as you can se below:
enter image description here

Upvotes: 7

Waqar Rashid
Waqar Rashid

Reputation: 404

It can be using tildes (~~) like the same way as for bold, italic, etc. Below is the example from the GitLab documentation:

Any word wrapped with two tildes (like ~~this~~) will appear crossed out.

Upvotes: 15

Related Questions