-
-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Inline Equation and Equation Block #40
base: master
Are you sure you want to change the base?
Conversation
The modification is premature. I used the "Comment" option for the highlighting because it gives a better looking (different from code delimiter). Any idea to assign it a better group? |
@oblitum , The following two lines are responsible for that red block.
So the syntax is marked as error, on purpose.. I don't know the reason, either. |
@hupili ok thanks. |
I'm guessing the underscores are marked as errors to highlight the problem that unescaped mid-word underscores cause some Markdown parsers to start italicizing (valid behavior per the original spec, but many parsers have deactivated it for being too annoying) - I've noticed that if I enter, say, a url that contains underscores, they get flagged, but then if I wrap the url in I find myself adding unneeded (for parsers I use) backslashes in front of mid-word underscores simply to make the error indication go away in the Vim syntax highlighting -- actually, I'd love to be able to stop doing that. Personally, I'd love to see some hypothetical Markdown 2.0 decree that mid-word |
@CarlRJ, thanks, good to know. Also, I'd like a Markdown 2.0 too, that would provide syntax for "please this is not markdown. parser, don't touch this!", both for paragraph (div-like) and inline (span-like). Would solve issue with embedding MathJax and other stuff inside markdown for all parsers, currently I must use kramdown because of that. |
Also, it's one of the reasons of this highlighter issue. Really, I can't undertand how markdown started without this simple but useful feature, would solve so much. |
Good to find this extended discussion. I'm also looking for MD 2.0. There are so many missing features in MD. I think the philosophy of MD is to only define syntax for 80% of your daily work. The rest 20% can always degrades to HTML. However, the original 80% daily work in the author's mind can only cover 50% of ours now, e.g. formula, table, etc. I like the Leave some pointers for my trial on MD:
|
It seems more and more people are combining markdown and mathjax now. This modification is adapted from the original code fence parsing rules. It gives better highlighting in vim.
Before (some normal texts are highlighted as italic )
After
Sine there are a lot
_
(underscore) in math formula, it is essential to isolate them in order not to other texts.