Open kerzol opened 10 years ago
Actually I do this: text = this.buffer.innerHTML; this.buffer.innerHTML = marked (text); and marked parses text inside HTML tags. So something like
$\text{ trata **bold** *italic*}$
works good.
But(!) for example
$\_$
produces no output... Because of that parsing. Maybe we should prevent markdown parsing within tags.
Check this
$\_$ italic? $\_$
Well, it seems that we must use Davide Cervone's approach in order to get good output from markdown+MathJax filter:
"The main idea is to strip out the math (and replace by tokens) then run Markdown, then replace the tokens by the original math afterward"
Davide even provides the following script:
http://www.math.union.edu/~dpvc/transfer/mathjax/mathjax-editing.js
But i don't sure about its license.
Also Davide wrote: "I was going to include it as part of a sample in the MathJax examples directory, and the rest of MathJax is Apache2" ( http://stackoverflow.com/questions/11228558/let-pagedown-and-mathjax-work-together#comment17378458_11231030 )
Do we have any news about this example?
-- Sergey
You can see my fork. Currently there are some issues, but it works
@gdalgas from Stack Overflow just released StackExchange MathJax editing code under MIT Licence
does not look good.