-
Notifications
You must be signed in to change notification settings - Fork 6
Syntax highlighting wrong #5
Comments
Hey. I am well aware of this problem... Actually the code highlighter of atom has a big caveat for blocks as it is only able to parse per line. Consider the following source: __bold__
__this
is
bold__
__actually
not
bold__ This is problematic and code highlighting does not even work on github.com, as you can see. bold bold__ At the moment it is implemented, that bold and emphasis are block environments. So once you have a starting The only alternative to the current parser would be if it would be only allowed to use bold / emphasised text inline, so that __this
is
bold__ would not be recognised anymore. |
BTW: The problem also exists with the official language-gfm package. And I broke my head over regex searches for over 12 hours to fix it. |
OK, I'll stick to a Thanks |
Pandoc takes into account the code written in LaTeX or HTML for the formatting. Therefore, such a snippet shouldn't be highlighted as such:
If it's not clear enough, the bold highlighting runs from the first
_
in the \cite to the first_
in the equation. I guess that if we are in a LaTeX environment (i.e in\command{ *here* }
), we should apply the highlight only in this block: starting an highlight in\command{
should finish before the}
.(I made the code above copy-pastable to reproduce the problem), even though Github has processed the Markdown)
The text was updated successfully, but these errors were encountered: