MathJaxSwift
MathJaxSwift copied to clipboard
Reset JSContext exception after processing
The current implementation never resets the JSContext exception property. This means that a single exception will pollute all subsequent calls to MathJaxSwift e.g.
-
try tex2svg(input1)throws -
MathJax.context.exceptionis now non-nil -
try tex2svg(input2)should succeed, but still throws because ofinput1exception
The naive fix is to reset the context.exception after checking for the current exception.