-
Notifications
You must be signed in to change notification settings - Fork 274
Closed
Description
Try these two things out in the dingus. The first one has a string, that looks like a closing fence, indented four spaces. The second one is only indented three spaces.
~~~
~~~ ~~~
~~~The spec definitely wants the second one to be an empty code block, but it's a bit ambiguous about the first:
The closing code fence may be preceded by up to three spaces of indentation, and may be followed only by spaces or tabs, which are ignored.
Pulldown-cmark checks "spaces of indentation" relative to the indentation level of the opening fence, but the reference implementation, commonmark-hs and markdown-it all seem to check relative to the start of the line.
Details
Events from pulldown-cmark:
" ~~~#4\n ~~~\n" -> [
Start(CodeBlock(Fenced(Borrowed(""))))
End(CodeBlock)
]Events from pandoc:
" ~~~#4\n ~~~\n" -> [
Start(CodeBlock(Fenced(Borrowed(""))))
Text(Boxed(" ~~~"))
End(CodeBlock)
]Events from commonmark.js:
" ~~~#4\n ~~~\n" -> [
Start(CodeBlock(Fenced(Borrowed(""))))
Text(Boxed(" ~~~"))
End(CodeBlock)
]AST from pandoc:
Pandoc {
meta: {},
blocks: [
CodeBlock(
Attr(
"",
[
"#4",
],
[],
),
" ~~~",
),
],
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels