Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: base 64 formulas support #113

Merged
merged 6 commits into from
Mar 13, 2025
Merged

Conversation

arzola
Copy link
Contributor

@arzola arzola commented Mar 13, 2025

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:

  • Updated chai to version 4.5.0 and mocha to version 10.8.2. Added new dependencies: proxyquire and sinon. (package.json)

Feature Enhancements:

  • Enhanced routes/latex.js to handle base64 encoded formulas and added validation for formula and color format. (routes/latex.js)
  • Improved imageGenerator.js to decode HTML entities, handle base64 encoded formulas, and validate SVG content before generating PNGs. (src/imageGenerator.js) [1] [2]

Testing Improvements:

  • Refactored asciimath.test.js to use mock responses and added tests for various scenarios including complex expressions and error handling. (test/asciimath.test.js)
  • Added new test file base64.test.js to cover base64 encoded formulas for TeX, AsciiMath, and MathML formats, including edge cases. (test/base64.test.js)

Minor Changes:

  • Modified the home page title in routes/index.js to include an emoji for a more engaging UI. (routes/index.js)
  • Removed redundant comments and console logs for cleaner code in imageGenerator.js. (src/imageGenerator.js) [1] [2]

@arzola arzola marked this pull request as draft March 13, 2025 15:27
@arzola
Copy link
Contributor Author

arzola commented Mar 13, 2025

I need to fix a remaining issue with asciimath hold a little bit

@arzola arzola marked this pull request as ready for review March 13, 2025 16:17
Copy link
Contributor

@ho-man-chan ho-man-chan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ho-man-chan ho-man-chan merged commit e94b1b2 into dev Mar 13, 2025
1 check passed
@ho-man-chan ho-man-chan deleted the feat/base64-formulas-support branch March 13, 2025 16:39
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.

2 participants