Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Rendering issues in MathJax when nested with markdown symbols (*, _) #177
Describe the bug
When symbols like
Steps to reproduce (if necessary)
Steps to reproduce the behavior:
Rendering issues can be seen in the following examples:
Here is a live example . Also, I've attached a screenshot:
What should've happened?
Version or last commit:
@thebaer I think the issue here is that our markdown processor is breaking the math blocks.
I will see if blackfriday supports skipping these, if not I think the best way would be to write a blackfriday extension that does exactly that. It shouldn't be too much work as we know what our inline and display delimiters are.
Hi @robjloranger, thanks for the response. I currently don't have access to the blog instance, so can't help you out there.
I haven't used blackfriday-latex before, but it looks like it isn't being actively developed right now. Also, since MathJax is so hugely popular, we can expect folks to be more familiar with it's syntax and ask for it's support, which is why I was wondering how complicated the patch for the current thing would look like? If it isn't too much, I would vote for continuing support with MathJax.
Again, thank you for building this wonderful tool! :-)
No problem, I confirmed that this does seem to fix the problem but introduces a new one. Markdown is then rendered as literal text.
I think our best bet is to parse the post body before rendering the markdown. Whether that is with an extension of blackfriday or our own in house solution, it will not change the MathJax behavior.
This would probably involve parsing the body and wrapping MathJax notation in a span with a class like
Ahh, that cleared up my confusion, thanks!
Yeah, that makes total sense.