Closed ghost closed 10 years ago
the ambiguity in how various markdown parsers treat unescaped underscores is not really a concern for reMarked.
in html, all underscores are literal so i can escape them universally outside of code sections.
i tried escaping _
in my /tests
documents, it created less readable markdown in many cases without a single instance of behaving in a beneficial fashion to italicize the middle of a word. perhaps this use case is more common in non-tech writing, where a literal underscore is plain wtf and the only use for underscores and asterisks is to style text.
the original markdown actually treats underscores and asterisks the same way so in theory you can still italicize the middle of a word by using asterisks: http://daringfireball.net/projects/markdown/syntax#em
i've decided to leave this alone and follow what github does, which i consider quite sensible. IMO it makes much more sense to leave "one file" alone and retain the underscores.
**file_one file_two**
gets converted to:\*\*file_one file_two\*\*
The
*
is escaped but not_
Some markdown editors will italicize "one file".
This isn't affecting me as of now but I think it's an interesting test case to consider.