mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[PR #23717] [CLOSED] Feat katex2mathjax 18507 #42961
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/23717
Author: @jorgeventura
Created: 4/14/2026
Status: ❌ Closed
Base:
main← Head:feat-katex2mathjax-18507📝 Commits (6)
65c67ddSave to avoid lose something at this pointfa88078Beginning to work, matrices as well.f4a7782Matrices are workingcf270cfNeeds remove $ in excess9e78732The $ excess fixed.30949fefeat(math): complete KaTeX to MathJax migration and chemistry support📊 Changes
12 files changed (+224 additions, -111 deletions)
View changed files
📝
package-lock.json(+16 -1)📝
package.json(+1 -1)📝
src/app.css(+7 -11)📝
src/app.html(+30 -0)📝
src/lib/components/chat/Messages/Markdown.svelte(+2 -2)➖
src/lib/components/chat/Messages/Markdown/KatexRenderer.svelte(+0 -33)📝
src/lib/components/chat/Messages/Markdown/MarkdownInlineTokens.svelte(+3 -3)📝
src/lib/components/chat/Messages/Markdown/MarkdownTokens.svelte(+5 -5)➕
src/lib/components/chat/Messages/Markdown/MathRenderer.svelte(+87 -0)📝
src/lib/utils/index.ts(+2 -2)📝
src/lib/utils/marked/math-extension.ts(+68 -53)📝
vite.config.ts(+3 -0)📄 Description
refactor(math): migrate math rendering engine from KaTeX to MathJax. The feature request #18508 was the motivation .
Summary
This PR completes the migration of the math rendering engine from KaTeX to MathJax. This is a foundational change to how mathematical notation is processed and displayed within the application. The support for chemistry was also included.
Motivation
The migration was driven by the need for:
Key Changes
src/lib/utils/marked/math-extension.tsand related utilities to handle MathJax-specific delimiters and delimiters (e.g.,\ce{},\pu{},\begin{equation}).Testing Performed
$ ... $).$$ ... $$).\begin{equation},\ce{}).Impact
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.