Skip to content

Handle mathjax arg when passed to Kaleido constructor - #320

Merged
emilykl merged 3 commits into
masterfrom
mathjax-fix
Apr 28, 2025
Merged

Handle mathjax arg when passed to Kaleido constructor#320
emilykl merged 3 commits into
masterfrom
mathjax-fix

Conversation

@emilykl

@emilykl emilykl commented Apr 28, 2025

Copy link
Copy Markdown
Collaborator

Handle mathjax arg when passed to Kaleido constructor via **kwargs.

mathjax need to be popped from kwargs before kwargs is passed to choreo.Browser(); and then mathjax needs to be passed as an argument to PageGenerator().

Without this change, calling kaleido.calc_fig_sync(..., kopts=dict(mathjax="<mathjax-url>")) fails with the following error raised by choreographer:

RuntimeError: Chromium.get_cli() received invalid args: dict_keys(['mathjax'])

This PR also updates the test in test_calc_fig.py to test passing a Mathjax url.

@emilykl
emilykl requested a review from ayjayt April 28, 2025 18:47

@ayjayt ayjayt left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

huh interesting illl have to look more closely to see what i did

@emilykl
emilykl merged commit 9da5928 into master Apr 28, 2025
@ayjayt
ayjayt deleted the mathjax-fix branch October 6, 2025 18:15
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