I have searched the existing issues and discussions.
I am using the latest version of Open WebUI.
Installation Method
Docker
Open WebUI Version
v0.6.7
Ollama Version (if applicable)
v0.6.8
Operating System
Windows 11
Browser (if applicable)
No response
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 sending a piece of text immediately followed by a block of code starting with "---", everything should be well formatted :
PS : this is applicable for, for example, YAML block of code, where "---" is widely used as the 1st line (cf. StackOverflow, RedHat)
Actual Behavior
When sending a piece of text immediately followed by a block of code starting with "---", the ``` is ignored and the text above it is transformed into a title.
The ``` used for ending the block of code are therefor used as the start of the block of code
Steps to Reproduce
Open a new chat or edit an already existing prompt
Copy or manually write the following bloc code (if you manually type it, be wary of the "---" as they are automatically merged into "—-") :
test
```
---
```
Send
Logs & Screenshots
Example n°1 :
test
```
---
```
Expected Behavior :
Actual Behavior :
Example n°2 :
this is a PVC for k8s :
```
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pihole-etc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
```
Expected Behavior :
Actual Behavior :
Additional Information
No response
Originally created by @goulvenb on GitHub (May 8, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/13709
### Check Existing Issues
- [x] I have searched the existing issues and discussions.
- [x] I am using the latest version of Open WebUI.
### Installation Method
Docker
### Open WebUI Version
v0.6.7
### Ollama Version (if applicable)
v0.6.8
### Operating System
Windows 11
### Browser (if applicable)
_No response_
### 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.
- [ ] I have included the browser console logs.
- [ ] I have included the Docker container logs.
- [x] I have listed steps to reproduce the bug in detail.
### Expected Behavior
When sending a piece of text immediately followed by a block of code starting with "---", everything should be well formatted :

PS : this is applicable for, for example, YAML block of code, where "---" is widely used as the 1st line (cf. [StackOverflow](https://stackoverflow.com/questions/50788277/why-3-dashes-hyphen-in-yaml-file), [RedHat](https://www.redhat.com/en/topics/automation/what-is-yaml))
### Actual Behavior
When sending a piece of text immediately followed by a block of code starting with "---", the ` ``` ` is ignored and the text above it is transformed into a title.
The ` ``` ` used for ending the block of code are therefor used as the start of the block of code

### Steps to Reproduce
1. Open a new chat or edit an already existing prompt
2. Copy or manually write the following bloc code (if you manually type it, be wary of the "---" as they are automatically merged into "—-") :
````
test
```
---
```
````
3. Send
### Logs & Screenshots
# Example n°1 :
````
test
```
---
```
````
Expected Behavior :

Actual Behavior :

---
# Example n°2 :
````
this is a PVC for k8s :
```
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pihole-etc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
```
````
Expected Behavior :

Actual Behavior :

### Additional Information
_No response_
GiteaMirror
added the bug label 2026-04-19 22:47:41 -05:00
Using triple backticks to create a code block requires a new line between the previous content.
<!-- gh-comment-id:2868856876 -->
@tjbck commented on GitHub (May 10, 2025):
This is caused by malformed markdown.
Using triple backticks to create a code block requires a new line between the previous content.
<!-- gh-comment-id:2868891360 -->
@goulvenb commented on GitHub (May 10, 2025):
That seem strange, i know there are many Markdown flavors out there, but i don't remember any of them needing a new line before a block of code ?
For example, the following example do not need a new line :
- Example 140 of the [CommonMark specification](https://spec.commonmark.org/0.31.2/#fenced-code-blocks)
- [Example 110 of the GitHub Flavored Markdown](https://github.github.com/gfm/#example-110)
And those do not specify the need of a new line (so i believe it's not mandatory, or else it would've been specified) :
- [Github Documentation](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#quoting-code)
- [GitLab Flavored Markdown](https://docs.gitlab.com/user/markdown/#code-spans-and-blocks)
- 1st result of [Google](https://www.google.com/search?q=markdown%20documentation) while searching for [Markdown Documentation](https://www.markdownguide.org/extended-syntax/#fenced-code-blocks)
What flavor is used here ?
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 @goulvenb on GitHub (May 8, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/13709
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.6.7
Ollama Version (if applicable)
v0.6.8
Operating System
Windows 11
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
When sending a piece of text immediately followed by a block of code starting with "---", everything should be well formatted :

PS : this is applicable for, for example, YAML block of code, where "---" is widely used as the 1st line (cf. StackOverflow, RedHat)
Actual Behavior
When sending a piece of text immediately followed by a block of code starting with "---", the

```is ignored and the text above it is transformed into a title.The
```used for ending the block of code are therefor used as the start of the block of codeSteps to Reproduce
Logs & Screenshots
Example n°1 :
Expected Behavior :


Actual Behavior :
Example n°2 :
Expected Behavior :


Actual Behavior :
Additional Information
No response
@tjbck commented on GitHub (May 10, 2025):
This is caused by malformed markdown.
Using triple backticks to create a code block requires a new line between the previous content.
@goulvenb commented on GitHub (May 10, 2025):
That seem strange, i know there are many Markdown flavors out there, but i don't remember any of them needing a new line before a block of code ?
For example, the following example do not need a new line :
And those do not specify the need of a new line (so i believe it's not mandatory, or else it would've been specified) :
What flavor is used here ?