Skip to content

Conversation

@nhojb
Copy link

@nhojb nhojb commented Mar 31, 2025

The current implementation never resets the JSContext exception property. This means that a single exception will pollute all subsequent calls to MathJaxSwift e.g.

  1. try tex2svg(input1) throws
  2. MathJax.context.exception is now non-nil
  3. try tex2svg(input2) should succeed, but still throws because of input1 exception

The naive fix is to reset the context.exception after checking for the current exception.

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

Successfully merging this pull request may close these issues.

1 participant