-
- Notifications
You must be signed in to change notification settings - Fork 639
Closed
Description
Adjacent code blocks get merged:
$ printf '```\naa\n```\n```\nbb\n```' | cmark -t html <pre><code>aa </code></pre> <pre><code>bb </code></pre> $ printf '```\naa\n```\n```\nbb\n```' | cmark -t commonmark | cmark -t html <pre><code>aa bb </code></pre> Parenthetical remark: This doesn't happen with single-character code blocks because of the logic at commonmark.c:294:
$ printf '```\n1\n```' | cmark -t commonmark ``` 1 ``` $ printf '```\n12\n```' | cmark -t commonmark 12 An easy way to fix this would be to delete about 10 lines from commonmark.c and render all code blocks without indentation.
Personally I prefer not to use indentation for code blocks. One could argue that it's better because it lets one copy-paste the code more easily. I'm not using indentation in this text box.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels