Vote #80443
完了Markdown: Fix sections parsing with code blocks
0%
説明
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.
journals
#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:*
!{width: 681px; border: 1px solid #ccc;}.test-wiki-page@2x.png!
*Without the patch:*
!{width: 570px; border: 1px solid #ccc;}.without-patch@2x.png!
*With the patch:*
!{width: 570px; border: 1px solid #ccc;}.with-patch@2x.png!
--------------------------------------------------------------------------------
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).
--------------------------------------------------------------------------------
Committed the patch. Thank you for detecting and fixing this issue.
--------------------------------------------------------------------------------