Originally created by @CH-chuan on GitHub (Mar 19, 2025).
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
v0.5.20
Ollama Version (if applicable)
No response
Operating System
Windows 10
Browser (if applicable)
Chrome
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
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
Originally created by @CH-chuan on GitHub (Mar 19, 2025).
### 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
v0.5.20
### Ollama Version (if applicable)
_No response_
### Operating System
Windows 10
### Browser (if applicable)
Chrome
### 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
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_
GiteaMirror
added the bug label 2025-11-11 15:55:13 -06:00
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.
@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.
You'll observe the same behaviour from ChatGPT. This should be considered as a model issue, however would be happy to accept PRs.
@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.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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.