Csharp code pasting saves with improper formatting and in 1 line #3543

Closed
opened 2025-11-11 15:33:38 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @ninicdennis on GitHub (Feb 2, 2025).

Bug Report

Installation Method

[Describe the method you used to install the project, e.g., git clone, Docker, pip, etc.]

All setup with docker

Environment

  • Open WebUI Version: v0.5.7

  • Ollama (if applicable): 0.5.7-0-ga420a45-dirty

  • Operating System: Fedora Linux

  • Browser (if applicable): Brave

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on 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 the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

The code block will properly format the csharp code so that it is not contained on a single line.

Actual Behavior:

After sending the message, the format will automatically place everything onto one line, it does not seem to matter whether tab or space indents was used.

Description

Bug Summary:

When submitting a message using csharp and pasting in code from Rider, the code will not format properly and return in one line.

Reproduction Details

Steps to Reproduce:

  1. Take the following code:
public enum FletchingType {
  Plastic = 10,
  TurkeyFeather = 5,
  GooseFeather = 3
}
  1. Paste this into the prompt, and submit the message, that will format the message back into a single line.

Logs and Screenshots

Browser Console Logs:

Image

Screenshots/Screen Recordings (if applicable):
[Attach any relevant screenshots to help illustrate the issue]

Image

Image

Originally created by @ninicdennis on GitHub (Feb 2, 2025). # Bug Report ## Installation Method [Describe the method you used to install the project, e.g., git clone, Docker, pip, etc.] All setup with docker ## Environment - **Open WebUI Version:** v0.5.7 - **Ollama (if applicable):* 0.5.7-0-ga420a45-dirty* - **Operating System:** Fedora Linux - **Browser (if applicable):** Brave **Confirmation:** - [x] I have read and followed all the instructions provided in the README.md. - [x] I am on 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 the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: The code block will properly format the csharp code so that it is not contained on a single line. ## Actual Behavior: After sending the message, the format will automatically place everything onto one line, it does not seem to matter whether tab or space indents was used. ## Description **Bug Summary:** When submitting a message using csharp and pasting in code from Rider, the code will not format properly and return in one line. ## Reproduction Details **Steps to Reproduce:** 1. Take the following code: ``` public enum FletchingType { Plastic = 10, TurkeyFeather = 5, GooseFeather = 3 } ``` 2. Paste this into the prompt, and submit the message, that will format the message back into a single line. ## Logs and Screenshots **Browser Console Logs:** ![Image](https://github.com/user-attachments/assets/4b1385df-07e6-4bcf-991b-4deec6853c2a) **Screenshots/Screen Recordings (if applicable):** [Attach any relevant screenshots to help illustrate the issue] ![Image](https://github.com/user-attachments/assets/0fd5633a-71ac-47f8-8a56-367c41df439b) ![Image](https://github.com/user-attachments/assets/cacf3957-7cd5-4378-9c8d-298f9a234427)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#3543