#6358 closed defect (bug) (fixed)

Readme Parsing gets tripped up by new lines in the headers

Reported by: dd32's profile dd32 Owned by: dd32's profile dd32
Milestone: Priority: normal
Component: Plugin Directory Keywords:


A readme.txt that looks something like this:

=== MyPlugin ===
Tags: a, b, c

Stable Tag: 1.2



=== MyPlugin ===
Tags: a, b, c
Stable Tag: 1.2

MyPlugin: Does these things

causes the readme parser to get tripped up and incorrectly parse or discard some of the lines.

In the first case, it will ignore the Stable tag, and in the second it'll discard the short description.

Props Ipstenu for the report.

Change History (1)

#1 @dd32
23 months ago

  • Owner set to dd32
  • Resolution set to fixed
  • Status changed from new to closed

In 11908:

Plugin Directory: Readme Parser: Be more tolerable of blank lines within the headers if it's followed by a valid header.

This allows for these edgecases to be handled:

  • "Tags: a,b,c\n\nStable Tag: 1.2"
  • "Tags: a,b,c\nStrangeHeader: true\nStable Tag: 1.2"

along with the expected and valid

  • "tags: a,b,c\nStable Tag: 1.2"

while also not discarding a Short description just because it contained a :.

Props Ipstenu for the report.
Fixes #6358.

Note: See TracTickets for help on using tickets.