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

Viewed 11412

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

3 Answers

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.

There is no built-in overline function in GitHub flavored Markdown.

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:

1̅

Alternatively, you can use a generator for this.

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

Related