プロジェクト

全般

プロフィール

Vote #79117

完了

Enable lax_spacing for markdown formatting in order to allow markdown blocks not surrounded by empty lines

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

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

0%

予定工数:
category_id:
26
version_id:
138
issue_org_id:
28119
author_id:
107353
assigned_to_id:
332
comments:
6
status_id:
5
tracker_id:
3
plus1:
1
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

In the markdown standard format, an empty line is required before and after a block in order to render the content properly.

  1. List without an empty line (doesn't work)
    | !{width:200px}md_syntax_1.png! | -> | !{width:200px}md_output_1.png! |

  2. List with an empty line (works ok)
    | !{width:200px}md_syntax_2.png! | -> | !{width:200px}md_output_2.png! |

  3. Enabling option @:lax_spacing@ for markdown formatting (more details about this option on "github":https://github.com/vmg/redcarpet#and-its-like-really-simple-to-use) allows also the first format:
    | !{width:200px}md_syntax_3.png! | -> | !{width:200px}md_output_3.png! |

We already rolled out this change on our instance because most of the times, we forget to let the empty line and we observe that it doesn't work after we save the changes.

The patch is attached.


journals

It happened to me just seconds ago.
+1
--------------------------------------------------------------------------------
This LGTM.

OT: Your patch reminded me btw that we might also want a simple test (like "@ApplicationHelperTest#test_footnotes@":/projects/redmine/repository/revisions/17194/entry/trunk/test/helpers/application_helper_test.rb#L1051) for markdown footnotes (in source:trunk/test/unit/lib/redmine/wiki_formatting/markdown_formatter_test.rb) as enabled per #16072. And while writing this, the questions of 'how many other textile syntax tests are there remaining lurking outside of source:/trunk/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb and what do we want to do with them?' comes up... But that is certainly for another issue.

--------------------------------------------------------------------------------
+1. It often annoys me.
I think we can commit this change to the trunk. Setting target version to 4.1.0.
--------------------------------------------------------------------------------
Committed. Thank you for the improvement.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Merged to stable branches.
--------------------------------------------------------------------------------


related_issues

duplicates,Closed,25339,Markdown: list renders only with leading newline

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

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

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

いいね!0
いいね!0