[GH-ISSUE #24948] issue: [<positive-integer>] is not rendered in code blocks #123749

Open
opened 2026-05-21 03:14:26 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @ngladitz on GitHub (May 20, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24948

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

Installation Method

Pip Install

Open WebUI Version

v0.9.5

Ollama Version (if applicable)

No response

Operating System

macOS Tahoe

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 provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

"[0]" inside code snippets in response messages should be rendered / visible and copyable.

Actual Behavior

"[0]" inside code blocks is hidden in response messages and omitted when copying the code block.

Steps to Reproduce

Given the following query:

repeat verbatim:

data = [0]

I get the response (verified by using Copy on the entire message):

data = [0]

The "[0]" is not rendered in the code block and when using the code block specific "Copy" button it is also omitted from the clipboard:

data =

I seem to be able to reproduce this with any positive integer between the square brackets.
Does not reproduce with strings, negative integers or decimals.

Logs & Screenshots

Image

Additional Information

No response

Originally created by @ngladitz on GitHub (May 20, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/24948 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### Installation Method Pip Install ### Open WebUI Version v0.9.5 ### Ollama Version (if applicable) _No response_ ### Operating System macOS Tahoe ### 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. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior "[0]" inside code snippets in response messages should be rendered / visible and copyable. ### Actual Behavior "[0]" inside code blocks is hidden in response messages and omitted when copying the code block. ### Steps to Reproduce Given the following query: > repeat verbatim: > > ```python > data = [0] > ``` I get the response (verified by using Copy on the entire message): > ```python > data = [0] > ``` The "[0]" is not rendered in the code block and when using the code block specific "Copy" button it is also omitted from the clipboard: > data = I seem to be able to reproduce this with any positive integer between the square brackets. Does not reproduce with strings, negative integers or decimals. ### Logs & Screenshots <img width="1034" height="405" alt="Image" src="https://github.com/user-attachments/assets/9fbb1012-eca7-41fd-8d5a-03dd38a88091" /> ### Additional Information _No response_
GiteaMirror added the bug label 2026-05-21 03:14:26 -05:00
Author
Owner

@owui-terminator[bot] commented on GitHub (May 20, 2026):

🔍 Related Issues Found

I found some existing issues that might be related. Please check if any of these are duplicates or contain helpful solutions:

  1. 🟢 #24746 issue: v0.9.5 assistant message Copy button collapses Markdown line breaks when pasted into Obsidian / text editors
    This is closely related because it reports a regression in the assistant message copy behavior for Markdown content in v0.9.5. Both issues involve code/markdown content being copied incorrectly from rendered messages, suggesting a shared copy/render pipeline problem.
    by george3430 · bug

  2. 🟣 #12864 issue: Python syntax is being interpreted wrong.
    This is related at the rendering layer: Python syntax inside text is being misinterpreted as Markdown emphasis, showing that code-like content can be transformed incorrectly. The new issue’s disappearing digits in code blocks may stem from the same Markdown parsing/rendering bug class.
    by updawg · bug

  3. 🟣 #16745 issue: Copy button in code blocks copies the original AI output instead of the edited content
    This issue also concerns code blocks and the copy button, specifically that the copied content does not match what is displayed after edits. It is a direct precedent for code block copy behavior being inconsistent with rendered content.
    by yuliang615 · bug


💡 If your issue is a duplicate, please close it and add any additional details to the existing issue instead.

This comment was generated automatically. React with 👍 if helpful, 👎 if not.

<!-- gh-comment-id:4498991895 --> @owui-terminator[bot] commented on GitHub (May 20, 2026): <!-- terminator-bot:related-issues-reply --> 🔍 **Related Issues Found** I found some existing issues that might be related. Please check if any of these are duplicates or contain helpful solutions: 1. 🟢 [#24746](https://github.com/open-webui/open-webui/issues/24746) **issue: v0.9.5 assistant message Copy button collapses Markdown line breaks when pasted into Obsidian / text editors** *This is closely related because it reports a regression in the assistant message copy behavior for Markdown content in v0.9.5. Both issues involve code/markdown content being copied incorrectly from rendered messages, suggesting a shared copy/render pipeline problem.* *by george3430 · `bug`* 2. 🟣 [#12864](https://github.com/open-webui/open-webui/issues/12864) **issue: Python syntax is being interpreted wrong.** *This is related at the rendering layer: Python syntax inside text is being misinterpreted as Markdown emphasis, showing that code-like content can be transformed incorrectly. The new issue’s disappearing digits in code blocks may stem from the same Markdown parsing/rendering bug class.* *by updawg · `bug`* 3. 🟣 [#16745](https://github.com/open-webui/open-webui/issues/16745) **issue: Copy button in code blocks copies the original AI output instead of the edited content** *This issue also concerns code blocks and the copy button, specifically that the copied content does not match what is displayed after edits. It is a direct precedent for code block copy behavior being inconsistent with rendered content.* *by yuliang615 · `bug`* --- 💡 If your issue is a duplicate, please close it and add any additional details to the existing issue instead. *This comment was generated automatically.* React with 👍 if helpful, 👎 if not.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#123749