Fix #45: TeX option serialization regression for grouped expressions#46
Open
wesleyel wants to merge 2 commits intocolinc86:mainfrom
Open
Fix #45: TeX option serialization regression for grouped expressions#46wesleyel wants to merge 2 commits intocolinc86:mainfrom
wesleyel wants to merge 2 commits intocolinc86:mainfrom
Conversation
Agent-Logs-Url: https://github.com/wesleyel/MathJaxSwift/sessions/1a55a5a3-bce1-4639-9b63-878d9f9f212b Co-authored-by: wesleyel <48174882+wesleyel@users.noreply.github.com>
…or-regression Fix TeX option serialization regression that broke valid grouped expressions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#45
This pull request refactors how TeX options are handled in the MathJaxSwift converters and adds new tests to ensure valid TeX expressions do not generate error nodes in the output. The main changes include centralizing TeX option normalization, updating all converters to use this new normalization function, and adding tests for grouped TeX expressions.
Refactoring and Centralization of TeX Options:
normalizeTeXOptionsfunction intexOptions.jsto centralize and standardize the handling of TeX options, including package selection and regex conversion for thedigitsoption. All converters now use this function instead of duplicating logic.chtml.js,svg.js, andmml.jsto usenormalizeTeXOptionsfor TeX input processing, removing direct manipulation of theAllPackageslist and simplifying option handling. [1] [2] [3] [4] [5] [6]Bug Fixes and Improvements:
TeXInputProcessorOptions.swiftto correctly escape braces and dots, ensuring proper parsing of numbers in TeX input.Testing Improvements:
Tex2CHTMLTests.swift,Tex2MMLTests.swift, andTex2SVGTests.swiftto verify that valid grouped TeX expressions do not emit error nodes in the generated output for each format. [1] [2] [3]