Skip to content
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

Mathjax re-rendering duplicates equation #16

Open
Cydox opened this issue Jul 3, 2016 · 2 comments
Open

Mathjax re-rendering duplicates equation #16

Cydox opened this issue Jul 3, 2016 · 2 comments

Comments

@Cydox
Copy link

Cydox commented Jul 3, 2016

Hallo,

editing an equation in a file that is being previewd does not seem to work properly:

  1. after the edit the original equation is still being shown and the LaTeX code for the modified equation is displayed above it.
  2. after modifying a different part of the document the modified equation is being rendered and displayed above the orignial one.

pictures:
1
2
3

@tomzx
Copy link

tomzx commented Sep 16, 2016

I'm having a similar issue, as well as related issues. The problem is that WrappedDomTree.diffTo returns the #text node of the .math.inline node generated by pandoc. Since it is returned as a replacement and not an insertion, the frontend will not attempt to re-render it (through a call to MathJax.Hub.Typeset).

Sadly I'm not familiar enough with the code that does the diffing, but it appears to me that we would have to find a way for the .math.inline node to get tagged as changed instead of its #text node. This way, we would be able to replace said node in the DOM and have MathJax typeset it.

@tomzx
Copy link

tomzx commented Sep 16, 2016

I ended up finding a temporary solution that works for me (no change highlighting but no double rendering issues). See TomzxForks/markmon@468fd59.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants