Repository navigation
fix: preserve escaped dollar signs in Markdown math - #4130
hassamaslamkhan wants to merge 1 commit into
Conversation
|
|
It looks like this regression is caused by upgrading remark-math from v3 to v5. In v5 escapes inside inline math expressions are not supported: https://www.npmjs.com/package/remark-math/v/5.1.1
Rather than creating our own markdown parser, it might be better to document this change. |
|
Thanks for pointing this out @AnnMarieW . I hadn't realized this was an intentional change in remark-math v5. I agree that documenting the behavior and the Would you prefer that I update this PR to focus on documentation, or close it and open a separate documentation PR? |
|
@hassamaslamkhan I think it would be better to document the change, but let's wait for the maintainers to chime in. Thanks for this PR and for offering to update the docs! The Dash docs are in a private repo, so that would have to be handled seperately. |



Description
Fixes #4123.
This PR fixes a bug in
dcc.Markdownwhere escaped dollar signs (\$) inside inline math expressions are incorrectly interpreted by the Markdown parser, causing MathJax rendering to fail.The fix normalizes affected inline math expressions before Markdown parsing when
mathjax=True, while preserving regular Markdown behavior, including links, HTML, code blocks, and ordinary dollar signs.The changes include:
dcc.Markdown.Contributor Checklist
dev(bug fix).Test Evidence
Screenshots attached below demonstrate:
Optionals
CHANGELOG.md(not included in this PR).