summaryrefslogtreecommitdiff
path: root/src/blocks.c
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-02-06 13:35:29 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2016-02-06 13:35:29 -0800
commit131b79f9fe0ef73af74f93d17d3c71abd9c29621 (patch)
tree18c7f01051a72f6a89605b6811b00da5ae204946 /src/blocks.c
parentf5bcd71573aa11be4ffbf782907af3c51701e8da (diff)
S_advance_offset: Only set partially_consumed_tab in columns mode.
Diffstat (limited to 'src/blocks.c')
-rw-r--r--src/blocks.c2
1 files changed, 1 insertions, 1 deletions
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;