[markdown] underscores in URLs produce italicizing
See original GitHub issuehttp://goo.com/_foo bar baz [foo](bar)
gets rendered with the _ starting an italicized section, whereas it should just be part of the URL, as rendered below:
http://goo.com/_foo bar baz foo
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Underscores in URLs break markdown link parsing · Issue #529
The underscore italicizing is the expected behavior for markdown. Github decided that it becomes annoying when there is more than one underscore in...
Read more >How to format text containing underscore to italic style?
I have changed (almost rewritten) the Markdown regular expressions for bold and italics: client-side change, server-side change.
Read more >Basic Syntax - Markdown Guide
To italicize text, add one asterisk or underscore before and after a word or phrase. To italicize the middle of a word for...
Read more >MarkdownSharp is converting Url's that contain underscore ...
** UPDATE: I have just tested entering a url on StackOverflow which I believe uses a version of MarkdownSharp (and AutoHyperlink is enabled...
Read more >Understanding Markdown | Rick Steves Travel Forum
Italics and Bold: use asterisks and underscores to indicate spans of emphasis. Use one asterisk (or underscore) for italics and two asterisks (or...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I see. But then is there any reason to expect this underscore not to start an emphasis span? The CommonMark spec suggests treating punctuation (
/
in this case) the same as whitespace.I wasn’t talking about any special highlighting of the URL.
We are currently using this config for markdown mode:
The problem, as described above, is that when you paste my example into https://codemirror.net/mode/markdown/ the
_
starts an italicized section, which here is undesirable. The desired fix would be some adjustment of the tokenization etc. in the markdown mode so that underscores in contexts like this (e.g. preceded by / and maybe other characters) don’t trigger the start of italicizing.