svivian / q2a-markdown-editor

Markdown editor plugin for Question2Answer
55 stars 24 forks source link

A markdown editor bug? cannot show corrected formula with mathjax #21

Open johnbao6 opened 7 years ago

johnbao6 commented 7 years ago

I use markdown editor and mathjax to write math formula, sometimes it cannot show corrected form, here is the example:

$$(A2)\int{-\infty}^{+\infty} dx $$

Is this a markdown editor's bug?

When I use Basic Editor,it is OK.

Furthermore, in the Preview of markdown editor, the formula shows OK, but when I finish the editor, the answer shows problem.

johnbao6 commented 7 years ago

Now I am pretty sure the reason is two underscore _, but I have no idea how to find a simple way to solve it.

svivian commented 7 years ago

I think that underscores make something italic in Markdown so there could be a conflict there. Not sure there's anything I can do in the plugin to solve that. In your mathjax you can try "escaping" the underscores by putting \ before each one.