Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#1216 closed defect (bug) (wontfix)

Parsing readme files fails on code blocks starting with `#

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

Description (last modified by SergeyBiryukov)

When parses readme.txt files for plugins, it will fail whenever a code block is opened and then immediately followed by a #.

#this-will fail

The section will be cut off at the first backtick (which will be visible in the parse result) and parsing will continue as usual in the next section.

This behaviour can easily be replicated using the Readme Validator using the attached readme.txt file.

Attachments (1)

readme.txt (4.3 KB) - added by DvanKooten 9 years ago.
Sample readme.txt

Download all attachments as: .zip

Change History (7)

9 years ago

Sample readme.txt

#1 @SergeyBiryukov
9 years ago

  • Component changed from General to Plugin Directory
  • Description modified (diff)

#2 @Otto42
9 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

A hash at the front of a line like that is the markdown syntax for making headers. You cannot put those inside code blocks and expect it to work.

#3 follow-up: @DvanKooten
9 years ago

@Otto42 Not even inside code blocks? I mean, it's pretty common to have CSS examples (using ID's) in your plugin FAQ...

#4 in reply to: ↑ 3 @barrykooij
9 years ago

Replying to DvanKooten:

@Otto42 Not even inside code blocks? I mean, it's pretty common to have CSS examples (using ID's) in your plugin FAQ...

And one could even comment in PHP with #. Not every hashtag means someone is trying to type Markdown.

What is the reason this is instantly closed instead of asking what the intention of the hashtag was?

#5 @Otto42
9 years ago

The backtick mechanism is not part of markdown, it's one of our specific addons. We use it in lots of places, including our forums.

If you want to use hashes in your code blocks, use the normal markdown way of creating them: prefix them with four spaces on each line.

#this won't work

#this will work

#6 @Otto42
9 years ago

In short, backticks are meant for inline code blocks. They kinda work because of our forum-specific addon, but they are not markdown's code blocks. In the normal markdown library, other markdown is ignored inside of 4-space-prefixed code blocks.

Note: See TracTickets for help on using tickets.