Project

General

Profile

Actions

Patch #32359

closed

Markdown: Fix sections parsing with code blocks

Added by Jens Krämer over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Text formatting
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

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

Actions

Also available in: Atom PDF