From 3c0b582b52021a6abea644f056a4da4301e2bc30 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 16 Feb 2015 06:44:10 -0800 Subject: Properly handle " with no matching close quote with --smart. This occurs in fiction: when a speaker has dialogue with multiple paragraphs, a close quote is used only on the final one. Added test cases. --- src/inlines.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/inlines.c b/src/inlines.c index a5af1a5..3b2edbb 100644 --- a/src/inlines.c +++ b/src/inlines.c @@ -368,7 +368,7 @@ static cmark_node* handle_delim(subject* subj, unsigned char c, bool smart) if (c == '\'' && smart) { contents = cmark_chunk_literal("’"); } else if (c == '"' && smart) { - contents = cmark_chunk_literal("”"); + contents = cmark_chunk_literal(can_close ? "”" : "“"); } else { contents = cmark_chunk_dup(&subj->input, subj->pos - numdelims, numdelims); } -- cgit v1.2.3