[ruby] Get underlined text with Markdown

I am using BlueCloth as a Markdown library for Ruby, and I can't find any syntax for getting a text underlined. What is it?

This question is related to ruby markdown underline bluecloth

The answer is


In GitHub markdown <ins>text</ins>works just fine.


Markdown doesn't have a defined syntax to underline text.

I guess this is because underlined text is hard to read, and that it's usually used for hyperlinks.


You can wrote **_bold and italic_** and re-style it to underlined text, like this:

strong>em,
em>strong,
b>i,
i>b {
    font-style:normal;
    font-weight:normal;
    text-decoration:underline;
}

In Jupyter Notebooks you can use Markdown in the following way for underlined text. This is similar to HTML5: (<u> and </u>).

<u>Underlined Words Here</u>


Both <ins>text</ins> and <span style="text-decoration:underline">text</span> work perfectly in Joplin, although I agree with @nfm that underlined text looks like a link and can be misleading in Markdown.


The simple <u>some text</u> should work for you.


Another reason is that <u> tags are deprecated in XHTML and HTML5, so it would need to produce something like <span style="text-decoration:underline">this</span>. (IMHO, if <u> is deprecated, so should be <b> and <i>.) Note that Markdown produces <strong> and <em> instead of <b> and <i>, respectively, which explains the purpose of the text therein instead of its formatting. Formatting should be handled by stylesheets.

Update: The <u> element is no longer deprecated in HTML5.


Examples related to ruby

Uninitialized Constant MessagesController Embed ruby within URL : Middleman Blog Titlecase all entries into a form_for text field Ruby - ignore "exit" in code Empty brackets '[]' appearing when using .where find_spec_for_exe': can't find gem bundler (>= 0.a) (Gem::GemNotFoundException) How to update Ruby Version 2.0.0 to the latest version in Mac OSX Yosemite? How to fix "Your Ruby version is 2.3.0, but your Gemfile specified 2.2.5" while server starting Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? How to update Ruby with Homebrew?

Examples related to markdown

How to add empty spaces into MD markdown readme on GitHub? how to make a new line in a jupyter markdown cell How do I display local image in markdown? How to markdown nested list items in Bitbucket? How to apply color in Markdown? How to right-align and justify-align in Markdown? Is there a way to add a gif to a Markdown file? How to add new line in Markdown presentation? How link to any local file with markdown syntax? How to insert a line break <br> in markdown

Examples related to underline

Flutter: how to make a TextField with HintText but no Underline? How to Add a Dotted Underline Beneath HTML Text Changing Underline color Removing underline with href attribute How do you underline a text in Android XML? To draw an Underline below the TextView in Android CSS Box Shadow Bottom Only Get underlined text with Markdown Remove stubborn underline from link Underline text in UIlabel

Examples related to bluecloth

Get underlined text with Markdown