New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
richmahn opened this Issue Jul 6, 2016 · 3 comments

Comments

Projects
None yet
4 participants
@richmahn
Copy link

richmahn commented Jul 6, 2016

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

This comment has been minimized.

Copy link
Collaborator

rtfb commented Jul 6, 2016

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

This comment has been minimized.

Copy link
Collaborator

dmitshur commented Jul 7, 2016

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

This comment has been minimized.

Copy link

kaushalmodi commented Jun 20, 2018

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.

kaushalmodi added a commit to kaushalmodi/ox-hugo that referenced this issue Jun 20, 2018

Workaround for Blackfriday bug in italicizing links with underscores
Replaces underscores with "%5F" (hex code for underscores) in
links (only of http, https, ftp and mailto type).

- Fixes #170.

Revert his commit once
russross/blackfriday#278 gets fixed.

BloggerBust pushed a commit to BloggerBust/bloggerbust.github.io that referenced this issue Nov 12, 2018

TrevorWilsonSS
Created a tinyurl to the nauci base init licensed
Blackfriday defect
278 (russross/blackfriday#278) causes
italicized links to render with underscores visible and the link not
italicized. To work around this defect the ox-hugo exporter that I use
to export org-mode markup to blackfriday markdown URI encodes
underscores in links. This should not be a problem except that
underscore percent-encoded characters are part of the unreserved set
which do not have standardized behaviour. It turns out that Github does
not treat URI encoded underscores the same as literal underscores and
so the workaround for the blackfriday defect exposed an issue when
linking to such URIs at Github. To get around this final issue I have
created a tinyurl for my license since the actual URI contains
underscores.

For reference see kaushalmodi/ox-hugo#236.

BloggerBust pushed a commit to BloggerBust/bloggerbust.ca that referenced this issue Nov 12, 2018

TrevorWilsonSS
Created a tinyurl to the nauci base init licensed
Blackfriday defect
278 (russross/blackfriday#278) causes
italicized links to render with underscores visible and the link not
italicized. To work around this defect the ox-hugo exporter that I use
to export org-mode markup to blackfriday markdown URI encodes
underscores in links. This should not be a problem except that
underscore percent-encoded characters are part of the unreserved set
which do not have standardized behaviour. It turns out that Github does
not treat URI encoded underscores the same as literal underscores and
so the workaround for the blackfriday defect exposed an issue when
linking to such URIs at Github. To get around this final issue I have
created a tinyurl for my license since the actual URI contains
underscores.

For reference see kaushalmodi/ox-hugo#236.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment