From 2ceb1a1d7a7e01f57b7b09bf78c81c204bf9b4a0 Mon Sep 17 00:00:00 2001 From: Ryan Fleury Date: Wed, 29 Dec 2021 09:21:39 -0700 Subject: [PATCH] possible bugfix for eating up newlines too ambitiously when ending unscoped sets --- source/md.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/md.c b/source/md.c index 75868ca..0bf27cf 100644 --- a/source/md.c +++ b/source/md.c @@ -2440,12 +2440,18 @@ MD_ParseNodeSet(MD_Arena *arena, MD_String8 string, MD_u64 offset, MD_Node *pare if(potential_closer.kind == MD_TokenKind_Newline) { closer_check_off += potential_closer.raw_string.size; - off = closer_check_off; + // TODO(rjf): As far as I can tell, we can't actually do this, + // because higher-level unscoped sets may depend on this newline + // so they can be terminated. + // off = closer_check_off; // NOTE(rjf): always terminate with a newline if we have >0 children if(parsed_child_count > 0) { - off = closer_check_off; + // TODO(rjf): As far as I can tell, we can't actually do this, + // because higher-level unscoped sets may depend on this newline + // so they can be terminated. + // off = closer_check_off; got_closer = 1; break; }