Links with two or more underscores are masked with <em></em> tag #126

Closed
haimich opened this Issue Sep 5, 2013 · 2 comments

Comments

Projects
None yet
2 participants
@haimich

haimich commented Sep 5, 2013

We use the library to generate html out of markdown for our RSS feeds. We recently received a bug report that a certain link wasn't displayed correctly in the feed - after some research we found out that links like

http://www.google.de/a_nice_link/index.html

will become

http://www.google.de/anicelink/index.html

after transformation. If you find some time we'd appreciate you having a look after this. Thanks!

@michelf

This comment has been minimized.

Show comment
Hide comment
@michelf

michelf Sep 6, 2013

Owner

Actually the Markdown syntax requires links to be put inside angle brackets like this <http://domain/path>. If you get a link without the angle brackets, something else than PHP Markdown is making it a link.

PHP Markdown mimics the behavior of the original Markdown parser, accepting underscores inside words to mean italic. (Your link is seen as plain text since it is not surrounded by angle brackets.) If you don't want underscores inside words to mean italic, use the Markdown Extra parser.

Owner

michelf commented Sep 6, 2013

Actually the Markdown syntax requires links to be put inside angle brackets like this <http://domain/path>. If you get a link without the angle brackets, something else than PHP Markdown is making it a link.

PHP Markdown mimics the behavior of the original Markdown parser, accepting underscores inside words to mean italic. (Your link is seen as plain text since it is not surrounded by angle brackets.) If you don't want underscores inside words to mean italic, use the Markdown Extra parser.

@haimich

This comment has been minimized.

Show comment
Hide comment
@haimich

haimich Sep 6, 2013

Thanks a lot for your fast response, I didn't know this was part of the MD syntax. We will try out the Markdown Extra parser or surround the links with < > when entered in our frontend.

haimich commented Sep 6, 2013

Thanks a lot for your fast response, I didn't know this was part of the MD syntax. We will try out the Markdown Extra parser or surround the links with < > when entered in our frontend.

@haimich haimich closed this Sep 6, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment