From 131b79f9fe0ef73af74f93d17d3c71abd9c29621 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 6 Feb 2016 13:35:29 -0800 Subject: S_advance_offset: Only set partially_consumed_tab in columns mode. --- src/blocks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/blocks.c') diff --git a/src/blocks.c b/src/blocks.c index 53d0251..20ea579 100644 --- 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; -- cgit v1.2.3