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

Bugfix : Added mathjax_ignore to HTMLFormatter._write_table and changed tests to assert mathjax_ignore #60043

Closed
wants to merge 13 commits into from

Conversation

Maru5er
Copy link

@Maru5er Maru5er commented Oct 14, 2024

Feedback would be appreciated.

@Maru5er Maru5er requested a review from attack68 as a code owner October 15, 2024 00:22
Copy link
Contributor

@attack68 attack68 left a comment

Choose a reason for hiding this comment

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

LGTM - test cases covered

@rhshadrach
Copy link
Member

/preview

@rhshadrach
Copy link
Member

@datapythonista - the /preview feature seems broken, I get a 500 response from the server.

https://github.com/pandas-dev/pandas/actions/runs/11469095078/job/31915606006

Should I open an issue?

@@ -366,9 +366,11 @@ def _translate(
if not get_option("styler.html.mathjax"):
table_attr = table_attr or ""
if 'class="' in table_attr:
table_attr = table_attr.replace('class="', 'class="tex2jax_ignore ')
table_attr = table_attr.replace(
'class="', 'class="tex2jax_ignore mathjax_ignore"'
Copy link
Member

Choose a reason for hiding this comment

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

This should be

'class="', 'class="tex2jax_ignore mathjax_ignore '

as we are prepending to an already existing class.

doc/source/whatsnew/v3.0.0.rst Outdated Show resolved Hide resolved
Maru5er and others added 3 commits October 23, 2024 11:30
else:
table_attr += ' class="tex2jax_ignore"'
table_attr += 'class="tex2jax_ignore mathjax_ignore"'
Copy link
Contributor

Choose a reason for hiding this comment

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

There is a reason for this space at the start.

else:
table_attr += ' class="tex2jax_ignore"'
table_attr += 'class="tex2jax_ignore mathjax_ignore"'
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
table_attr += 'class="tex2jax_ignore mathjax_ignore"'
table_attr += ' class="tex2jax_ignore mathjax_ignore"'

@KevsterAmp
Copy link
Contributor

This PR seems to have gone stale, can I take over this issue? Thanks

@rhshadrach @attack68

@rhshadrach
Copy link
Member

@KevsterAmp - sounds good.

@@ -366,9 +366,11 @@ def _translate(
if not get_option("styler.html.mathjax"):
table_attr = table_attr or ""
if 'class="' in table_attr:
table_attr = table_attr.replace('class="', 'class="tex2jax_ignore ')
table_attr = table_attr.replace(
'class="', ' class="tex2jax_ignore mathjax_ignore '
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
'class="', ' class="tex2jax_ignore mathjax_ignore '
'class="', 'class="tex2jax_ignore mathjax_ignore '

@KevsterAmp
Copy link
Contributor

@rhshadrach - Do I commit on this branch or I re-open a new PR? Thanks

@mroeschke
Copy link
Member

Thanks for this PR, but the issue was closed by #60311

@mroeschke mroeschke closed this Nov 14, 2024
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.

BUG: Disabling pandas option display.html.use_mathjax has no effect
5 participants