Patch #32359
closed
Markdown: Fix sections parsing with code blocks
Added by Jens Krämer about 5 years ago.
Updated about 5 years ago.
Description
When there are spaces present between the code fence and the info string (as in ~~~ ruby
vs ~~~ruby
), the sections parsing fails to recognize the beginning of the code block and thus sections following such a block are not recognized correctly. Since it is perfectly valid Markdown to have one or more spaces in that place, the sections parsing should support that as well.
The patch extends an existing test case to demonstrate the behavior and fixes it by making the regular expression that is used more lenient.
Files
#17686 may have been caused by the behavior which is fixed here.
Confirmed the issue.
The patch can be applied cleanly to the trunk and 4.0-stable. Setting the target version to 4.0.6.
Test Wiki page:
Without the patch:
With the patch:
- Target version changed from 4.0.6 to 4.1.0
Go MAEDA wrote:
The patch can be applied cleanly to the trunk and 4.0-stable.
I misunderstood something. Unfortunately, the patch cannot be merged as it is due to r18810 (RuboCop related).
- Status changed from New to Closed
- Assignee set to Go MAEDA
Committed the patch. Thank you for detecting and fixing this issue.
Also available in: Atom
PDF