Skip to content

MBS-10618: Fix mathjax display#66

Merged
marcusgreen merged 2 commits intomarcusgreen:mainfrom
bycs-lp:MBS-10618-Fix_mathjax_display
Feb 23, 2026
Merged

MBS-10618: Fix mathjax display#66
marcusgreen merged 2 commits intomarcusgreen:mainfrom
bycs-lp:MBS-10618-Fix_mathjax_display

Conversation

@PhMemmel
Copy link
Copy Markdown
Contributor

@PhMemmel PhMemmel commented Feb 20, 2026

The basic issue here is that the external LLM will send back LaTeX code wrapped in \( ... \) delimiters, sometimes additionally escaped like it has to be to be JSON-parsable, sometimes not. It will then be escaped by the process_feedback function and JSON-parsed which will then end up with a properly parsed text string which ideally still contains \( ... \). However after that (and that's why the tests so far have been green, but MathJax still has not been applied), we send the results through format_text which will not recognize this, but instead we have to add an additional backslash to each backslash for format_text to properly let it through as backslash instead of a escaping symbol.

@PhMemmel PhMemmel force-pushed the MBS-10618-Fix_mathjax_display branch from 575630c to 710efa8 Compare February 20, 2026 10:07
@marcusgreen marcusgreen merged commit 5b2426b into marcusgreen:main Feb 23, 2026
1 check passed
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