cmark

My personal build of CMark ✏️

Commit
131b79f9fe0ef73af74f93d17d3c71abd9c29621
Parent
f5bcd71573aa11be4ffbf782907af3c51701e8da
Author
John MacFarlane <jgm@berkeley.edu>
Date

S_advance_offset: Only set partially_consumed_tab in columns mode.

Diffstat

1 file changed, 1 insertion, 1 deletion

Status File Name N° Changes Insertions Deletions
Modified src/blocks.c 2 1 1
diff --git a/src/blocks.c b/src/blocks.c
@@ -587,7 +587,7 @@ static void S_advance_offset(cmark_parser *parser, cmark_chunk *input,
   while (count > 0 && (c = peek_at(input, parser->offset))) {
     if (c == '\t') {
       chars_to_tab = TAB_STOP - (parser->column % TAB_STOP);
-      parser->partially_consumed_tab = chars_to_tab > count;
+      parser->partially_consumed_tab = columns && chars_to_tab > count;
       chars_to_advance = parser->partially_consumed_tab ? count : chars_to_tab;
       parser->column += chars_to_advance;
       parser->offset += parser->partially_consumed_tab ? 0 : 1;