Brickster / pretty-markdown

Sublime Text plugin for beatifying a markdown file when saving.
MIT License
0 stars 0 forks source link

4+ emphasis delimiters shouldn't ignore conversion #14

Closed Brickster closed 10 years ago

Brickster commented 10 years ago

Currently, if the settings require bolds to be converted to asterisks and italics converted to underscores, the following text would go unchanged:

****bold and italics****

The idea was that the converter can't easily figure out which ones the convert and which ones to leave alone. Actually looking at the resulting HTML confirms that we can: __bold and italics** (note: I had to add escapes in the raw text due to the GitHub Markdown converter completely ignoring the text when four delimiters are used). The outer three delimiters are used and the inner most becomes just another part of the emphasized string.

This will require significant changes to italic_utils since it currently uses the inner most delimiters as the italics delimiter. This is completely wrong since it would change the text to be emphasized. Since it ignores more than 3 delimiters, it's not a problem right now.

I don't think bold_utils will change as much since it already grabs the outer two delimiters. Both will have to stop ignoring the text when "overwhelmed" though.