Skip to content

fix: render LaTeX math in chat messages#1168

Open
nimitbhardwaj wants to merge 1 commit intoRightNow-AI:mainfrom
nimitbhardwaj:fix/latex-rendering
Open

fix: render LaTeX math in chat messages#1168
nimitbhardwaj wants to merge 1 commit intoRightNow-AI:mainfrom
nimitbhardwaj:fix/latex-rendering

Conversation

@nimitbhardwaj
Copy link
Copy Markdown
Contributor

@nimitbhardwaj nimitbhardwaj commented May 6, 2026

Summary

Fixes #1167 - LaTeX math not rendering in chat

Changes

  • webchat.rs: CSP updated to allow https://cdn.jsdelivr.net for scripts, styles, fonts, and connect-src
  • chat.js: MutationObserver in init() watches for new .message-bubble elements and calls renderLatex() automatically

Testing

  • cargo clippy --workspace --all-targets -- -D warnings passes
  • cargo test --workspace passes
  • Live integration tested (if applicable)

Security

  • No new unsafe code
  • No secrets or API keys in diff
  • User input validated at boundaries

@nimitbhardwaj
Copy link
Copy Markdown
Contributor Author

@jaberjaber23 you can re-run the action, that format issue of the PR will be fixed in CI/CD, I initially used the wrong format for the PR.

May be its worth mentioning in AGENTS.md or CLAUDE.md about the format of the PR to be generated.

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.

LaTeX/Mathematical Equations Not Rendering in Chat in Openfang Web

1 participant