Making WordPress.org

Opened 7 years ago

Last modified 6 years ago

#2738 assigned defect (bug)

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

Reported by: yo35's profile yo35 Owned by: tellyworth's profile tellyworth
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 (8)

#1 @SergeyBiryukov
7 years ago

  • Component changed from General to Plugin Directory

#2 @Otto42
7 years 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
7 years 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
7 years 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
7 years 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
7 years 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
7 years ago

  • Keywords 2nd-opinion added

#8 @tellyworth
6 years ago

  • Owner set to tellyworth
  • Status changed from new to assigned
Note: See TracTickets for help on using tickets.