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 #1

Updated by Jens Krämer over 4 years ago

#17686 may have been caused by the behavior which is fixed here.

Actions #2

Updated by Go MAEDA over 4 years ago

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:

Actions #3

Updated by Go MAEDA over 4 years ago

  • 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).

Actions #4

Updated by Go MAEDA over 4 years ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA

Committed the patch. Thank you for detecting and fixing this issue.

Actions

Also available in: Atom PDF