#1216 closed defect (bug) (wontfix)
Parsing readme files fails on code blocks starting with `#
Reported by: | DvanKooten | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Plugin Directory | Keywords: | |
Cc: |
Description (last modified by )
When WordPress.org parses readme.txt
files for plugins, it will fail whenever a code block is opened and then immediately followed by a #
.
_Example_
`
#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)
Change History (7)
#2
@
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:
↓ 4
@
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
@
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.
@Otto42
What is the reason this is instantly closed instead of asking what the intention of the hashtag was?
#5
@
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
Sample readme.txt