Given a ProseMirror instance with both prosemirror-math and an input rule for automatically detecting *italic* text, type the following:
The two functions $f(n)=(5+n)*2$ and $g(n)=(n*2)+10$ are...
Since math source is currently represented as a text node, ProseMirror will scan the math source processing inputRules. In this example, it will recognize the substring *2$ and $g(n)=(n* as italic text and erase one of the math blocks.
Possible solutions:
keep math source in an attr instead
re-implement the inputRules to somehow ignore custom nodeViews
Given a ProseMirror instance with both
prosemirror-math
and an input rule for automatically detecting*italic*
text, type the following:Since math source is currently represented as a text node, ProseMirror will scan the math source processing inputRules. In this example, it will recognize the substring
*2$ and $g(n)=(n*
as italic text and erase one of the math blocks.Possible solutions: