Skip to content

fix: physics should be required explicitly#118

Merged
fdalcin merged 5 commits intodevfrom
fix/require-physics
Apr 1, 2025
Merged

fix: physics should be required explicitly#118
fdalcin merged 5 commits intodevfrom
fix/require-physics

Conversation

@arzola
Copy link
Copy Markdown
Contributor

@arzola arzola commented Apr 1, 2025

This pull request makes several updates to the src/imageGenerator.js file and the test cases in test/latex.test.js to enhance the LaTeX rendering functionality and improve test coverage. The most important changes include moving the TeX configuration inside the generate function, adding logging for decoded math, and updating the test cases to use base64 encoded LaTeX strings.

#117

Enhancements to LaTeX rendering:

  • Moved the TeX configuration inside the generate function to dynamically include the 'physics' package based on the input (src/imageGenerator.js).
  • Added logging statements to output the decoded math for debugging purposes (src/imageGenerator.js). [1] [2]

Improvements to test coverage:

  • Updated test cases to use base64 encoded LaTeX strings for better handling of special characters (test/latex.test.js). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]
  • Added a new test case to ensure the physics package is loaded correctly for base64 encoded formulas (test/latex.test.js).
  • Enhanced the test case to verify the image type is correctly returned as PNG (test/latex.test.js).

Copy link
Copy Markdown

@fdalcin fdalcin left a comment

Choose a reason for hiding this comment

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

LGTM, tested locally and it works as described

@fdalcin fdalcin merged commit f8369d2 into dev Apr 1, 2025
1 check passed
@fdalcin fdalcin deleted the fix/require-physics branch April 1, 2025 15:14
fdalcin pushed a commit that referenced this pull request Jul 2, 2025
* fix: remove unneeded temporary deploy meta data

* fix: remove unneeded deploy meta data

* feat: mathjax-3 (#103)

* feat: mathjax-3

* physics wip

* wip add test cases

* wip add gh action

* add matrix test and handle htmlentities

* strip require and improve tests

* feat: base 64 formulas support (#113)

* feat: base 64 formulas support

* different test for gh

* gh approach

* fix asciimath parameters

* remove console

* mathml with base64

* chore: add claudia deploy instruction to use linux dependencies (#114)

* chore: add claudia deploy instruction to use linux dependencies

* improve readme

---------

Co-authored-by: Oscar Arzola <oscararzola@gmail.com>

* fix: physics should be required explicitly (#118)

* improve tests

* improve tests

* remove log

* remove log

* remove log

* fix: percent symbol formulas (#132)

* fix: mathml % formulas (#137)

* chore: remove dependabot in production since it is used in dev only
chore: update claudia.json to use production

---------

Co-authored-by: Christopher Murtagh <christopher@pressbooks.com>
Co-authored-by: Oscar Arzola <oscararzola@gmail.com>
ho-man-chan added a commit that referenced this pull request Jan 15, 2026
* fix: remove unneeded temporary deploy meta data

* fix: remove unneeded deploy meta data

* feat: mathjax-3 (#103)

* feat: mathjax-3

* physics wip

* wip add test cases

* wip add gh action

* add matrix test and handle htmlentities

* strip require and improve tests

* feat: base 64 formulas support (#113)

* feat: base 64 formulas support

* different test for gh

* gh approach

* fix asciimath parameters

* remove console

* mathml with base64

* chore: add claudia deploy instruction to use linux dependencies (#114)

* chore: add claudia deploy instruction to use linux dependencies

* improve readme

---------

Co-authored-by: Oscar Arzola <oscararzola@gmail.com>

* fix: physics should be required explicitly (#118)

* improve tests

* improve tests

* remove log

* remove log

* remove log

* fix: percent symbol formulas (#132)

* fix: mathml % formulas (#137)

* fix: mathml % on other tags (#139)

* fix: mathml % on other tags

* non optional

* non optional

* feat: add automated deploy pipeline in aws (#142)

* feat: add release please for automated versioning and releases (#143)

* feat: add Release Please for automated versioning and releases

- Add release-please workflow with function.zip artifact on release
- Add release-please config and manifest files
- Update tests workflow to run on production branch
- Update README with release process documentation
- Remove obsolete claudia.json (replaced by CodePipeline)

* docs: add CHANGELOG.md and link in README

---------

Co-authored-by: Ho Man Chan <homan98@gmail.com>
Co-authored-by: Christopher Murtagh <christopher@pressbooks.com>
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