Open postaid opened 1 month ago
One concern of mine is that something like $x*\text{foo}$
will not get parsed correctly. Can you check that this PR still parses text inside of math correctly?
Thanks for the contribution! It looks like a few tests need to be fixed up.
Should I fix them in this PR?
Yes, please.
Hi @siefkenj! Add some fix to peg grammar. Add "math_shift" entity ($) to math_token parsing.
Also change text content nodes detection inside "unifiedLatexLintNoPlaintextOperators", because current implementation counting on "no math context inside groups".
This looks good so far. Can you add a test for $x_{y_{\text{hello there $p_q_r$}}}$
?
Added the test you are asked for.
Got the problem finally. Add separate processing of \text
macro inside math context.
Hi @siefkenj This PR should fix #114
Main change is to replace "group" with "math_group" in "math_token" section of peg latex grammar. Also add "options" param to
processLatexToAstViaUnified
function which allows ti use "math" mode