sublime-markdown-extended
sublime-markdown-extended copied to clipboard
Fix gfm highlighting with _ and __ (see #96 and #61)
This is a fix for gfm handling of _ (italic) and __ (bold), see #96 and #61
Here's my test file before and after:

It would be simpler to remove completly the _ from (**|__)(?=\S) and support only * but it would be against standard...
@bitwiser73 sorry it's been a while.
I'd love to merge this, but I haven't had time to test it locally (and it seems like every time I've merged in regex changes there have been regressions). I'd love to find a way to do tests with this package, it would make these decisions much easier. For now, I'd settle for at least another user or two confirming that these changes don't break anything.
The patch works for me with no adverse side effects that I have noticed.
One thing I don't see in the examples is a mixture of bold and italics or mixtures of the variants of both kinds of bold and italics. The patterns in the examples are fairly "safe".
@bitwiser73 it would help if you could paste all of that text into a gist or a gfm block in a comment so I don't have to retype it all. thanks!
@jonschlinkert Could this get merged?
@jonschlinkert
I'd love to find a way to do tests with this package, it would make these decisions much easier
There is a standardised syntax test in Sublime Text 3, like they're using for the default packages: https://github.com/sublimehq/Packages/blob/master/Markdown/syntax_test_markdown.md. You just write a markdown file with some annotations for which scopes you expect and Sublime will run it. I was planning to add tests (derived from the default package's Markdown syntax) to my fork of this repo anyway and if you're interested I could do a PR so you can borrow it?