Paragraph rendering in comments is broken #4263

Closed
opened 2025-11-02 05:44:12 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @guillep2k on GitHub (Nov 7, 2019).

Description

Gitea no longer recognizes paragraphs in a comment, making a single paragraph for all the contents.

I suspect #8560 as the source cause.

Screenshots

This is a three paragraph text:

image

But it's rendered as a single paragraph:

image

Originally created by @guillep2k on GitHub (Nov 7, 2019). - Gitea version (or commit ref): d5b1e6bc51f87eb1be07a4682798428bf4bbb9ce - Can you reproduce the bug at https://try.gitea.io: - [x] Yes https://try.gitea.io/guillep2k/charset-problem/issues/4 ## Description Gitea no longer recognizes paragraphs in a comment, making a single paragraph for all the contents. I suspect #8560 as the source cause. ## Screenshots #### This is a three paragraph text: ![image](https://user-images.githubusercontent.com/18600385/68360898-84ed6680-0100-11ea-8414-539fc42c9949.png) #### But it's rendered as a single paragraph: ![image](https://user-images.githubusercontent.com/18600385/68360902-87e85700-0100-11ea-974e-80509a57c10d.png)
GiteaMirror added the type/bug label 2025-11-02 05:44:12 -06:00
Author
Owner

@InExtremaRes commented on GitHub (Nov 8, 2019):

It also happens for us in messages in PR, issues, etc. Placing two break lines between paragraphs makes it works. The preview of the message is shown correctly nonetheless.

@InExtremaRes commented on GitHub (Nov 8, 2019): It also happens for us in messages in PR, issues, etc. Placing two break lines between paragraphs makes it works. The preview of the message is shown correctly nonetheless.
Author
Owner

@zeripath commented on GitHub (Nov 9, 2019):

@lafriks I suspect this is associated with the move to blackfriday 2.

@zeripath commented on GitHub (Nov 9, 2019): @lafriks I suspect this is associated with the move to blackfriday 2.
Author
Owner

@tostercx commented on GitHub (Nov 11, 2019):

Also in wiki :<

@tostercx commented on GitHub (Nov 11, 2019): Also in wiki :<
Author
Owner

@guillep2k commented on GitHub (Nov 11, 2019):

From some quick tests I did, the problem seems to arise when input comes with \r\n instead of \n (which is not always the case). Removing \r from the input won't trigger the problem.

@guillep2k commented on GitHub (Nov 11, 2019): From some quick tests I did, the problem seems to arise when input comes with `\r\n` instead of `\n` (which is _not always_ the case). Removing `\r` from the input won't trigger the problem.
Author
Owner

@guillep2k commented on GitHub (Nov 11, 2019):

It seems to be tied to this issue at blackfriday, but reporters get inconsistent results: sometimes they need to convert \r\n to \n and sometimes the other way around. I wonder if this is will behave differently when Gitea is running under Linux, Windows, Mac, etc.

@guillep2k commented on GitHub (Nov 11, 2019): It seems to be tied to [this issue at blackfriday](https://github.com/russross/blackfriday/issues/522), but reporters get inconsistent results: sometimes they need to convert `\r\n` to `\n` and sometimes the other way around. I wonder if this is will behave differently when Gitea is running under Linux, Windows, Mac, etc.
Author
Owner

@guillep2k commented on GitHub (Nov 11, 2019):

OK, bad news: it's a problem that's been hanging around in blackfriday/v2 since 2018:

https://github.com/russross/blackfriday/issues/423

No merge in sight.

@guillep2k commented on GitHub (Nov 11, 2019): OK, bad news: it's a problem that's been hanging around in blackfriday/v2 since 2018: https://github.com/russross/blackfriday/issues/423 No merge in sight.
Author
Owner

@InExtremaRes commented on GitHub (Nov 11, 2019):

[...] Placing two break lines between paragraphs makes it works. [...]

I don't know exactly when this breaks but now placing two or more break lines doesn't work anymore; even PR that looked ok with that trick now are rendered as a single paragraph.

FWIW we are using gitea inside docker with the image gitea/gitea:latest. The host is Debian and the I access through an Archlinux using Chromium.

@InExtremaRes commented on GitHub (Nov 11, 2019): > [...] Placing two break lines between paragraphs makes it works. [...] I don't know exactly when this breaks but now placing two or more break lines doesn't work anymore; even PR that looked ok with that trick now are rendered as a single paragraph. FWIW we are using gitea inside docker with the image `gitea/gitea:latest`. The host is Debian and the I access through an Archlinux using Chromium.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#4263