-
Notifications
You must be signed in to change notification settings - Fork 274
Closed
Description
As mentioned in this test case, an indented code block needs eight spaces of indentation however if the indented code block starts on the next line it's parsed after five spaces.
Running cargo run -- -e -D on the following input
bar
: bazproduces these events:
0..16: Start(DefinitionList)
0..4: Start(DefinitionListTitle)
0..3: Text(Borrowed("bar"))
0..4: End(DefinitionListTitle)
4..16: Start(DefinitionListDefinition)
12..16: Start(CodeBlock(Indented))
12..16: Text(Borrowed("baz\n"))
12..16: End(CodeBlock)
4..16: End(DefinitionListDefinition)
0..16: End(DefinitionList)
EOF
And starting the code block on the next line only needs five spaces to parse an indented code block:
bar
:
baz0..15: Start(DefinitionList)
0..4: Start(DefinitionListTitle)
0..3: Text(Borrowed("bar"))
0..4: End(DefinitionListTitle)
4..15: Start(DefinitionListDefinition)
11..15: Start(CodeBlock(Indented))
11..15: Text(Borrowed("baz\n"))
11..15: End(CodeBlock)
4..15: End(DefinitionListDefinition)
0..15: End(DefinitionList)
Trying to start the code block using eight spaces of indentation on the next line results in extra whitespace being added to the indented code block.
bar
:
baz0..17: Start(DefinitionList)
0..4: Start(DefinitionListTitle)
0..3: Text(Borrowed("bar"))
0..4: End(DefinitionListTitle)
4..17: Start(DefinitionListDefinition)
11..17: Start(CodeBlock(Indented))
11..17: Text(Borrowed(" baz\n"))
11..17: End(CodeBlock)
4..17: End(DefinitionListDefinition)
0..17: End(DefinitionList)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels