cmark

My personal build of CMark ✏️

Commit
569f3787da2c44963bb25869c98ea492517a5716
Parent
6e599f2ceb8ca1aee0cdb47d37aba16ac5938641
Author
John MacFarlane <jgm@berkeley.edu>
Date

Replaced hard-coded 4 with TAB_STOP.

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
@@ -571,7 +571,7 @@ static void S_advance_offset(cmark_parser *parser, cmark_chunk *input,
   int chars_to_tab;
   while (count > 0 && (c = peek_at(input, parser->offset))) {
     if (c == '\t') {
-      chars_to_tab = 4 - (parser->column % TAB_STOP);
+      chars_to_tab = TAB_STOP - (parser->column % TAB_STOP);
       parser->column += chars_to_tab;
       parser->offset += 1;
       count -= (columns ? chars_to_tab : 1);