-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
Description
Description
For yaml files, the code viewer (yaml files as well as yaml code blocks in markdown) shows spaces at the end of the last line in multi-line values. These are NOT present in the source file, but for some reason they appear in the code viewer.
Sounds funny at first but becomes a hassle pretty quickly if you copy code from the browser window into your project. Now you have a lot of funky spaces that are REALLY there.
Reproduce
- In a (fresh) gitea repo, create a file
spaces-from-space.yaml
with following content:
test: |
multi
line
bla: "blub"
- Push the file to the repo
- In the Gitea UI, navigate to that file and click on the "Raw" button
- Now convince yourself one more time that there indeed is no space after the 3rd line
- Go back to the file view
- Select the 3rd code line with your mouse and see that there are spaces at the end of the line!
More proofs of concept
Also happens with markdown inline yaml: https://git.tjdev.de/DrMaxNix/snippets/src/branch/main/spaces-from-space.md
Gitea Version
v1.22.6
Can you reproduce the bug on the Gitea demo site?
No (registration disabled lol)
Screenshots


How are you running Gitea?
self built binary