russross / blackfriday

Blackfriday: a markdown processor for Go
Other
5.42k stars 598 forks source link

Links with underscores around them (italicize/emphasis) aren't being rendered as so #278

Open richmahn opened 8 years ago

richmahn commented 8 years ago

When we want a link to be italicized, we do the following:

  * _[The Qualities of a Good Translation](/en/ta/vol1/translate/guidelines_intro)_
  * _[What is Translation](/en/ta/vol1/translate/translate_whatis )_
  * _[Why We Translate the Bible](/en/ta/vol1/translate/translate_why)_

Yet it renders with the _'s still there to the left and right as in the attached image. If I do it here in Github or at http://markdownlivepreview.com/ it renders correctly:

The image and issue at hand is using Gogs (http://gogs.io) which has blackfriday as its Markdown renderer.

incorrect_rendering_of_underscores_around_link

rtfb commented 8 years ago

The problem seems to get triggered by the underscores in the link paths (...guidelines_intro, ...translate_whatis, etc). Can you confirm that you don't see this problem in the links that do not contain underscores, but follow the same italicized link pattern?

dmitshur commented 8 years ago

FWIW, I'll mention I've never seen links italicized that way in Markdown before. What I see more commonly is:

* [_Link text goes here_](https://www.example.org)
* [`foo.Bar`](https://www.example.org)
* [**very bold**](https://www.example.org)
kaushalmodi commented 6 years ago

Today I ended up with the same problem..

_What is a [two's complement](https://en.wikipedia.org/wiki/Two%27s_complement)?_

@shurcooL I need to italicize the whole question, and not just the link description.


This is a workaround:

*What is a [two's complement](https://en.wikipedia.org/wiki/Two%27s_complement)?*

But for consistency, I have always been using _ for italics and ** for bold.