Don't consume implicit newline delimiters.

Newlines should act as implicit delimiters for more than one nested set
in the absence of explicit delimiters.
For instance in "A:B:C\nD" the newline makes D a sibling of A.
This commit is contained in:
Miguel Lechon
2021-02-21 18:36:59 +01:00
parent c5d88b890b
commit 5d5b4e730c
+1 -1
View File
@@ -1700,7 +1700,7 @@ _MD_ParseSet(MD_ParseCtx *ctx, MD_Node *parent, _MD_ParseSetFlags flags,
child->flags |= MD_NodeFlag_BeforeSemicolon;
next_child_flags |= MD_NodeFlag_AfterSemicolon;
}
result |= !!MD_Parse_Require(ctx, MD_S8Lit("\n"), MD_TokenKind_Newline);
result |= (MD_Parse_PeekSkipSome(ctx, 0).kind == MD_TokenKind_Newline);
if(result && terminate_with_separator)
{
goto end_parse;