From baf5d11e04dc93ae12127faa727daeb5d0b6a63e Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 15 Jun 2015 12:09:21 -0700 Subject: skip_spaces: skip tabs too. --- src/inlines.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/inlines.c b/src/inlines.c index c5b72ba..f41a62a 100644 --- a/src/inlines.c +++ b/src/inlines.c @@ -199,7 +199,7 @@ static inline bool skip_spaces(subject *subj) { bool skipped = false; - while (peek_char(subj) == ' ') { + while (peek_char(subj) == ' ' || peek_char(subj) == '\t') { advance(subj); skipped = true; } @@ -1192,6 +1192,7 @@ bufsize_t cmark_parse_reference_inline(cmark_strbuf *input, cmark_reference_map subj.pos = beforetitle; title = cmark_chunk_literal(""); } + // parse final spaces and newline: skip_spaces(&subj); if (!skip_line_end(&subj)) { -- cgit v1.2.3