mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 19:38:46 -05:00
issue: Markdown Mode Breaks When Returning Code Blocks with Language Specifiers #4485
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?
Originally created by @CH-chuan on GitHub (Mar 19, 2025).
Check Existing Issues
Installation Method
Git Clone
Open WebUI Version
v0.5.20
Ollama Version (if applicable)
No response
Operating System
Windows 10
Browser (if applicable)
Chrome
Confirmation
README.md.Expected Behavior
When returning source code in markdown mode, it should return complete, rather than break in the middle when facing language specifiers.
Actual Behavior
When requesting modifications to a markdown file and asking for the source code to be returned, the returned markdown file can break when it contains code blocks with language specifiers like:
```bash
your content
```
This issue causes the markdown mode to fail in rendering correctly, by breaking the markdown mode.
Steps to Reproduce
Simply ask the model to return a markdown source containing code blocks with language specifiers would reproduce it.
Logs & Screenshots
Additional Information
No response
@bannert1337 commented on GitHub (Mar 19, 2025):
Could you please post the full raw output? It looks like the Markdown code block was started further up.
So the next Markdown code block with "```python" is not rendered in another code block, as it is interpreted as raw text.
@tjbck commented on GitHub (Mar 19, 2025):
You'll observe the same behaviour from ChatGPT. This should be considered as a model issue, however would be happy to accept PRs.