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.
This pull request includes several improvements and new features to the codebase, particularly focusing on enhanced handling of LaTeX and AsciiMath formulas, including support for base64 encoded formulas, and updates to dependencies and tests. The most important changes are outlined below:
Dependency Updates:
chai
to version 4.5.0 andmocha
to version 10.8.2. Added new dependencies:proxyquire
andsinon
. (package.json
)Feature Enhancements:
routes/latex.js
to handle base64 encoded formulas and added validation for formula and color format. (routes/latex.js
)imageGenerator.js
to decode HTML entities, handle base64 encoded formulas, and validate SVG content before generating PNGs. (src/imageGenerator.js
) [1] [2]Testing Improvements:
asciimath.test.js
to use mock responses and added tests for various scenarios including complex expressions and error handling. (test/asciimath.test.js
)base64.test.js
to cover base64 encoded formulas for TeX, AsciiMath, and MathML formats, including edge cases. (test/base64.test.js
)Minor Changes:
routes/index.js
to include an emoji for a more engaging UI. (routes/index.js
)imageGenerator.js
. (src/imageGenerator.js
) [1] [2]