プロジェクト

全般

プロフィール

Vote #80443

完了

Markdown: Fix sections parsing with code blocks

Admin Redmine さんが約2年前に追加. 約2年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Text formatting_26
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
26
version_id:
127
issue_org_id:
32359
author_id:
40856
assigned_to_id:
332
comments:
4
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

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

Admin Redmine さんが約2年前に更新

  • カテゴリText formatting_26 にセット
  • 対象バージョン4.1.0_127 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0