Closed BuonOmo closed 8 years ago
I don't think that we should make the italic character into an option... We have a style-guide to base everything on and part of the goal behind this project is to reduce fragmentation in markdown usage.
However, I could see a case for selectively changing the character for sections of text that have an underscore in them, since a fair number of Markdown implementations handle it incorrectly: http://johnmacfarlane.net/babelmark2/?normalize=1&text=_italic_text_
That would be nice, I may try to do it if you want. Where is the corresponding class in libs ?
Sure! https://github.com/slang800/tidy-markdown/blob/5dd622fde4fbecfd6672c8958fd5522c852be3e9/lib/converters.coffee#L75 is the part that handles italic text.
Thank you. I’ll do it as soon as I have enough time to set a development environment!
I just had an idea: if you want to keep underscore all the time, why not escape underscore inside ? like this:
_my_text_ -> _my\_text_
That would be an alternative. However, the PR I just made is about this change :
_my_text_ -> *my_text*
closed via #37
When I save something in italic using
*
char, I don’t really care about this changing to_
. However sometimes it creates issues, like with this _simpleexample (github flavoured markdown fixes it as I see right now)! Maybe changing char should be an option, what do you think of it ?