Problem with the newlines in the README.md (markdown) #8471

Closed
opened 2025-11-02 08:07:32 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @Rollbacke on GitHub (Feb 2, 2022).

Gitea Version

1.16.0

Git Version

git version 2.30.2

Operating System

Raspbian 11 64b (arm64)

How are you running Gitea?

On raspberry pi 4b, running as docker (Docker version 20.10.12, build e91ed57) container (source from docker hub), behind a traefik reverse.

Database

PostgreSQL

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Description

When we have a "README.md" (so, markdown format).
There is probably a problem with the newline (cf. screenshots).

This, is displayed in one line:

Installation de docker-ce :
_Attention à l'architecture utilisée._

Screenshots

with_wi
in_gitea

Originally created by @Rollbacke on GitHub (Feb 2, 2022). ### Gitea Version 1.16.0 ### Git Version git version 2.30.2 ### Operating System Raspbian 11 64b (arm64) ### How are you running Gitea? On raspberry pi 4b, running as docker (Docker version 20.10.12, build e91ed57) container (source from docker hub), behind a traefik reverse. ### Database PostgreSQL ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Description When we have a "README.md" (so, markdown format). There is probably a problem with the newline (cf. screenshots). This, is displayed in one line: ``` Installation de docker-ce : _Attention à l'architecture utilisée._ ``` ### Screenshots ![with_wi](https://user-images.githubusercontent.com/86650802/152221920-e1ac4f93-6b90-4386-a01c-fdd9073dda8b.png) ![in_gitea](https://user-images.githubusercontent.com/86650802/152221922-8873434b-a97e-42a6-8b82-5d2807fce114.png)
GiteaMirror added the issue/not-a-bug label 2025-11-02 08:07:32 -06:00
Author
Owner

@zeripath commented on GitHub (Feb 3, 2022):

This is not a bug.

File rendering is different from comment rendering, This is how github renders it's markdown files and thus how we need to render our files.

Compare the start of these two files,

https://github.com/zeripath/pathological/blob/master/README.md

https://try.gitea.io/arandomer/pathological/src/branch/master/README.md

# Pathological

Pathological is an attempt to create pathological cases for Gitea stress testing

This is a line
with a break before with with no spaces and after with  
two spaces. GFM says the first doesn't get a `<br>`, only the second does.

This is two lines
with no spaces

This is two lines 
with one space

this is two lines  
with two spaces

if you really want to render hard breaks set ENABLE_HARD_LINE_BREAK_IN_DOCUMENTS in the markown section of the app.ini

@zeripath commented on GitHub (Feb 3, 2022): This is not a bug. File rendering is different from comment rendering, This is how github renders it's markdown files and thus how we need to render our files. Compare the start of these two files, https://github.com/zeripath/pathological/blob/master/README.md https://try.gitea.io/arandomer/pathological/src/branch/master/README.md ```md # Pathological Pathological is an attempt to create pathological cases for Gitea stress testing This is a line with a break before with with no spaces and after with two spaces. GFM says the first doesn't get a `<br>`, only the second does. This is two lines with no spaces This is two lines with one space this is two lines with two spaces ``` if you really want to render hard breaks set ENABLE_HARD_LINE_BREAK_IN_DOCUMENTS in the markown section of the app.ini
Author
Owner

@Rollbacke commented on GitHub (Feb 3, 2022):

OK, I didn't know. Thank you for the details ! :)

@Rollbacke commented on GitHub (Feb 3, 2022): OK, I didn't know. Thank you for the details ! :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8471