[GH-ISSUE #12036] issue: not parse to latex in some case #119757

Closed
opened 2026-05-20 21:10:11 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @liangxiwei on GitHub (Mar 25, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/12036

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Git Clone

Open WebUI Version

0.5.2

Ollama Version (if applicable)

0.6.2

Operating System

mac

Browser (if applicable)

chrome 100

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have listed steps to reproduce the bug in detail.

Expected Behavior

some md text need to be convert to latex.

const md = '\\(\\xi = (\\xi_1, \\dots, \\xi_N)\\)'; // this  can convert to latex 
const md2 = '\\(\\xi = (\\xi_1, \\dots, \\xi_N)\\)xx'; // this  can not convert to latex 

also I see the source code.

this file will detect the latex text and it can not detect the md text. But I dont know how to fix it. The test code can test in katex-extension.ts

const { inlineRule, blockRule } = generateRegexRules(DELIMITER_LIST);
console.log('inlineRule: ', inlineRule);

const md = '\\(\\xi = (\\xi_1, \\dots, \\xi_N)\\)xx';
const aa = md.match(inlineRule);
console.log('aa: ', aa);```

katex-extension.ts

Actual Behavior

none

Steps to Reproduce

none

Logs & Screenshots

none

Additional Information

No response

Originally created by @liangxiwei on GitHub (Mar 25, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/12036 ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Git Clone ### Open WebUI Version 0.5.2 ### Ollama Version (if applicable) 0.6.2 ### Operating System mac ### Browser (if applicable) chrome 100 ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have listed steps to reproduce the bug in detail. ### Expected Behavior some md text need to be convert to latex. ```ts const md = '\\(\\xi = (\\xi_1, \\dots, \\xi_N)\\)'; // this can convert to latex const md2 = '\\(\\xi = (\\xi_1, \\dots, \\xi_N)\\)xx'; // this can not convert to latex ``` also I see the source code. this file will detect the latex text and it can not detect the md text. But I dont know how to fix it. The test code can test in katex-extension.ts ```ts const { inlineRule, blockRule } = generateRegexRules(DELIMITER_LIST); console.log('inlineRule: ', inlineRule); const md = '\\(\\xi = (\\xi_1, \\dots, \\xi_N)\\)xx'; const aa = md.match(inlineRule); console.log('aa: ', aa);``` ``` [katex-extension.ts](https://github.com/open-webui/open-webui/blob/main/src/lib/utils/marked/katex-extension.ts) ### Actual Behavior none ### Steps to Reproduce none ### Logs & Screenshots none ### Additional Information _No response_
GiteaMirror added the bug label 2026-05-20 21:10:11 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#119757