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

Replace '$' char w/ HTML entity #562

Merged
merged 1 commit into from
Aug 12, 2024
Merged

Replace '$' char w/ HTML entity #562

merged 1 commit into from
Aug 12, 2024

Conversation

rich-iannone
Copy link
Member

With a recent update in gt, using fmt_markdown() with text between $ characters elicits a transformation of contained characters to formatted equation text in HTML. As noted in #561, even a single $ character will evoke the unwanted transformation since the text in doubled in the HTML string.

The short-term solution here is to replace any $ characters with their HTML entity %dollar;.

This problem will need more investigation since there are other places in the codebase where fmt_markdown() is used (likely with arbitrary text).

Fixes: #561

@rich-iannone rich-iannone requested a review from yjunechoe August 12, 2024 08:03
Copy link
Collaborator

@yjunechoe yjunechoe left a comment

Choose a reason for hiding this comment

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

Ah that's clever! And also works on my end - LGTM!

@yjunechoe yjunechoe merged commit 5a00f4b into main Aug 12, 2024
12 checks passed
@yjunechoe yjunechoe deleted the fix-dollar-equation branch September 8, 2024 04:54
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.

col_vals_regex() test not rendering in validation report
2 participants