WordPress.org

Making WordPress.org

Opened 8 months ago

Last modified 6 weeks ago

#2738 new defect

Plugin Directory: Single line breaks in readme.txt should be ignored

Reported by: yo35 Owned by:
Milestone: Plugin Directory v3.0 Priority: normal
Component: Plugin Directory Keywords: 2nd-opinion
Cc:

Description

In plugin description pages, a <br> tag is introduced in the page each time there is a line break in the readme.txt file. This goes against the usual Markdown behavior (see https://en.wikipedia.org/wiki/Markdown#Example).

Change History (7)

#1 @SergeyBiryukov
8 months ago

  • Component changed from General to Plugin Directory

#2 @Otto42
8 months ago

No, line breaks in the readme.txt result in paragraphs, not BR tags.

You need to provide examples of the problem for this to be seen.

#3 @yo35
8 months ago

Consider this example:

I am a very very long sentence that belongs to a single paragraph but I am split
on several lines in the readme.txt file so that I remains easily readable and
editable in plain text mode.

This would be rendered as follows:

<p>I am a very very long sentence that belongs to a single paragraph but I am split<br/>
on several lines in the readme.txt file so that I remains easily readable and<br/>
editable in plain text mode.</p>

The expected behavior -- according to the usual Markdown behavior -- would be to have it rendered without the two <br/> tags. By "usual Markdown behavior", I mean:

#4 @Ipstenu
8 months ago

  • Summary changed from Line breaks in readme.txt should be ignored to Plugin Directory: Single line breaks in readme.txt should be ignored

This is expected behavior in WordPress however :) If you wrote that example in WP's Post Editor, it would introduce line breaks.

Single line break == br

Double line break == p

This is not Markdown, it's nearly markdown, and we know that causes some confusion, but expecting full markdown behavior from your readme.txt is going to end badly.

I'm leaning towards a wontfix here since it's a part of the readme parser and being on WP now and not bbPress.

#5 @yo35
8 months ago

In case of a wontfix, the readme.txt sample file (https://wordpress.org/plugins/files/2016/06/readme.txt) should be updated, as it heavily uses single line breaks à-la Markdown.

#6 @tellyworth
6 weeks ago

  • Milestone set to Plugin Directory v3.0

Related: #2638

At the very least, we need to make documentation correct and more clear.

#7 @tellyworth
6 weeks ago

  • Keywords 2nd-opinion added
Note: See TracTickets for help on using tickets.