summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/blocks.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/blocks.c b/src/blocks.c
index 4432f78..38450e0 100755
--- a/src/blocks.c
+++ b/src/blocks.c
@@ -477,10 +477,6 @@ static void S_parser_feed(cmark_parser *parser, const unsigned char *buffer,
bool process = false;
for (eol = buffer; eol < end; ++eol) {
if (S_is_line_end_char(*eol)) {
- if (eol < end && *eol == '\r')
- eol++;
- if (eol < end && *eol == '\n')
- eol++;
process = true;
break;
}
@@ -514,6 +510,11 @@ static void S_parser_feed(cmark_parser *parser, const unsigned char *buffer,
}
buffer += chunk_len;
+ // skip over line ending characters:
+ if (buffer < end && *buffer == '\r')
+ buffer++;
+ if (buffer < end && *buffer == '\n')
+ buffer++;
}
}