You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] dcc.Markdown mishandles escaped dollar inside math expression #4122
In Dash 4.5.0, the escaped-dollar example is parsed/rendered incorrectly. The control case, the double-backslash example, and the $$...$$ example work as expected. The problematic input is r"escaped dollar: $\approx \$3,150$", where the intended escaped dollar inside the math expression is not preserved correctly.
Describe the bug
With dcc.Markdown(mathjax=True), an escaped dollar sign inside an inline math expression causes the expression to be parsed/rendered incorrectly. This appears to be a regression in the Markdown/math parsing pipeline introduced by the Markdown rewrite in PR #3960. The current regression test covers escaped dollar signs in ordinary Markdown text (outside math), but not an escaped dollar inside $...$.
Expected behavior
The escaped dollar should remain a literal dollar sign within the math expression, and the expression should render as intended. For example, r"escaped dollar: $\approx \$3,150$" should render approximately followed by $3,150.
Activity