You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prevent snake_case identifiers from being detected as LaTeX math (#291)
Tighten the bare subscript/superscript patterns in UNDELIMITED_LATEX_RE
and LATEX_EXPR_RE with lookaround assertions so identifiers like
`variable_name` are no longer matched, while expressions like `X_i` and
`X^2` still convert correctly.
it("does not convert snake_case identifiers in prose as math",()=>{
1126
+
consthtml='<p>Set the variable_name to the desired value and review snake_case style.</p>'
1127
+
constresult=convertLatexToMathml(html)
1128
+
expect(result).toBe(html)
1129
+
expect(result).not.toContain("<math")
1130
+
})
1131
+
1132
+
it("does not mangle snake_case words embedded in math-containing prose",()=>{
1133
+
consthtml='<p>Please configure the variable_name setting before running any experiments where X_i represents each independent measurement taken during the trial.</p>'
0 commit comments