Skip to content

Indented fenced code blocks not rendered properly #174

@Tachi107

Description

@Tachi107

Hi!

It seems that lowdown does not render fenced code blocks properly when they are indented. Quoting the Commonmark spec:

If the leading code fence is preceded by N spaces of indentation, then up to N spaces of indentation are removed from each line of the content (if present).

Here's an example from the spec:

   ```
   aaa
    aaa
  aaa
   ```

Which renders as:

<pre><code>   aaa
    aaa
  aaa
</code></pre>

lowdown indents the aaas as they appear in the markdown source, while only the second aaa should be indented, and by only one space instead of four.

Bye :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions