Fossil

View Ticket
Login
Ticket Hash: c8920f5e240bf535d10a2d2eefbdcefde29afb68
Title: Indented fenced code blocks with blank lines in Markdown
Status: Closed Type: Feature_Request
Severity: Minor Priority: Immediate
Subsystem: Resolution: Not_A_Bug
Last Modified: 2022-11-18 21:09:33
3.38 years ago
Created: 2022-11-11 13:39:32
3.40 years ago
Version Found In:
User Comments:
drh added on 2022-11-11 13:39:32:

An indented fenced code block is markup like this:

  > ~~~
  Text goes here
  ~~~

This works great as long as the text does not contain a blank line. But it does not work if the text does hold a blank line. Fenced code blocks with out the indentation (without the initial ">") work fine with blank lines.

It would be great if the markdown formatter could be fixed so that indented fenced code blocks work.


drh added on 2022-11-18 21:09:33:

Studying the code reveals that the indentation mark must be repeated after each blank line. (It can also be repeated on every line, but must at a minimum be repeated after blank lines.) That is apparently how Markdown is suppose to work.

Example:

> ~~~
First line
  Second line

>     Third line
~~~

The extra ">" at the start of "Third line" makes it work:

First line
  Second line

    Third line