Patch #28119


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

Added by Marius BĂLTEANU about 6 years ago. Updated almost 6 years ago.

Text formatting
Target version:
Start date:
Due date:
% Done:


Estimated time:


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)
2. List with an empty line (works ok)
3. Enabling option :lax_spacing for markdown formatting (more details about this option on github) allows also the first format:

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.


md_output_2.png (25.4 KB) md_output_2.png Marius BĂLTEANU, 2018-02-01 07:36
md_output_1.png (24 KB) md_output_1.png Marius BĂLTEANU, 2018-02-01 07:36
md_syntax_2.png (20.9 KB) md_syntax_2.png Marius BĂLTEANU, 2018-02-01 07:36
md_syntax_1.png (21.7 KB) md_syntax_1.png Marius BĂLTEANU, 2018-02-01 07:36
md_syntax_3.png (21.3 KB) md_syntax_3.png Marius BĂLTEANU, 2018-02-01 07:39
md_output_3.png (20.9 KB) md_output_3.png Marius BĂLTEANU, 2018-02-01 07:39
enable_lax_spacing_for_markdown.patch (1.22 KB) enable_lax_spacing_for_markdown.patch Marius BĂLTEANU, 2018-02-01 10:18

Related issues

Has duplicate Redmine - Defect #25339: Markdown: list renders only with leading newlineClosed

Actions #1

Updated by Bernhard Rohloff about 6 years ago

It happened to me just seconds ago.

Actions #2

Updated by Mischa The Evil about 6 years ago

  • Target version set to Unplanned backlogs

This LGTM.

OT: Your patch reminded me btw that we might also want a simple test (like ApplicationHelperTest#test_footnotes) 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.

Actions #3

Updated by Go MAEDA about 6 years ago

  • Target version changed from Unplanned backlogs to 4.1.0

+1. It often annoys me.
I think we can commit this change to the trunk. Setting target version to 4.1.0.

Actions #4

Updated by Go MAEDA about 6 years ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Target version changed from 4.1.0 to 4.0.0

Committed. Thank you for the improvement.

Actions #5

Updated by Go MAEDA almost 6 years ago

  • Has duplicate Defect #25339: Markdown: list renders only with leading newline added
Actions #6

Updated by Go MAEDA almost 6 years ago

  • Target version changed from 4.0.0 to 3.3.7

Merged to stable branches.


Also available in: Atom PDF