Copying text from source code view/diff view adds or removes newlines #5708

Closed
opened 2025-11-02 06:33:41 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @CirnoT on GitHub (Jul 8, 2020).

  • Gitea version (or commit ref): dbd5e4bb8d
  • Git version: gitea:latest
  • Operating system: gitea:latest
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant

Description

Copying selected chunk of text from source code/diff view either removes all newlines or produces additional ones when unnecessary. Removal happens on Chromium, while on Firefox newlines are added.

Screenshots

https://try.gitea.io/L0veSunshine/drone-gitea-release/src/branch/master/Dockerfile.arm

Original:
chrome_2020-07-08_13-43-12

Firefox:

FROM plugins/base:multiarch

LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" \

  org.label-schema.name="Drone Gitea Release" \

  org.label-schema.vendor="Drone.IO Community" \

  org.label-schema.schema-version="1.0"

ADD release/linux/arm/drone-gitea-release /bin/

ENTRYPOINT [ "/bin/drone-gitea-release" ]

Chromium:

FROM plugins/base:multiarch
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" \
  org.label-schema.name="Drone Gitea Release" \
  org.label-schema.vendor="Drone.IO Community" \
  org.label-schema.schema-version="1.0"
ADD release/linux/arm/drone-gitea-release /bin/
ENTRYPOINT [ "/bin/drone-gitea-release" ]
Originally created by @CirnoT on GitHub (Jul 8, 2020). - Gitea version (or commit ref): dbd5e4bb8d0f9d35e19549ecf0c9d8a1d5df167f - Git version: `gitea:latest` - Operating system: `gitea:latest` - Database (use `[x]`): - [x] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] Yes (provide example URL) - [ ] No - [ ] Not relevant ## Description Copying selected chunk of text from source code/diff view either removes all newlines or produces additional ones when unnecessary. Removal happens on Chromium, while on Firefox newlines are added. ## Screenshots https://try.gitea.io/L0veSunshine/drone-gitea-release/src/branch/master/Dockerfile.arm Original: ![chrome_2020-07-08_13-43-12](https://user-images.githubusercontent.com/1447794/86914689-ff9fd300-c120-11ea-8b5d-12cd7759ad73.png) Firefox: ``` FROM plugins/base:multiarch LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" \ org.label-schema.name="Drone Gitea Release" \ org.label-schema.vendor="Drone.IO Community" \ org.label-schema.schema-version="1.0" ADD release/linux/arm/drone-gitea-release /bin/ ENTRYPOINT [ "/bin/drone-gitea-release" ] ``` Chromium: ``` FROM plugins/base:multiarch LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" \ org.label-schema.name="Drone Gitea Release" \ org.label-schema.vendor="Drone.IO Community" \ org.label-schema.schema-version="1.0" ADD release/linux/arm/drone-gitea-release /bin/ ENTRYPOINT [ "/bin/drone-gitea-release" ] ```
GiteaMirror added the type/bug label 2025-11-02 06:33:41 -06:00
Author
Owner

@silverwind commented on GitHub (Jul 8, 2020):

Also noticed this, it's a regression from https://github.com/go-gitea/gitea/pull/12047.

@silverwind commented on GitHub (Jul 8, 2020): Also noticed this, it's a regression from https://github.com/go-gitea/gitea/pull/12047.
Author
Owner

@mrsdizzie commented on GitHub (Jul 8, 2020):

Added PR that should fix this if anybody can test

@mrsdizzie commented on GitHub (Jul 8, 2020): Added PR that should fix this if anybody can test
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5708