diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-04-28 23:30:16 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-04-28 23:32:37 -0700 |
commit | 80e2e88287f43d88ea92a77779b25e161c81f67b (patch) | |
tree | 91089036dc579894ac5eb837475bfa4a6291d9d7 /test | |
parent | 8fe7e8dd5c2667f0cac5af67ff1a02872eeb9933 (diff) | |
download | pandoc-80e2e88287f43d88ea92a77779b25e161c81f67b.tar.gz |
Smarter smart quotes.
Treat a leading " with no closing " as a left curly quote.
This supports the practice, in fiction, of continuing
paragraphs quoting the same speaker without an end quote.
It also helps with quotes that break over lines in line
blocks.
Closes #7216.
Diffstat (limited to 'test')
-rw-r--r-- | test/Tests/Readers/Markdown.hs | 2 | ||||
-rw-r--r-- | test/command/7216.md | 19 | ||||
-rw-r--r-- | test/command/pandoc-citeproc-320a.md | 12 |
3 files changed, 26 insertions, 7 deletions
diff --git a/test/Tests/Readers/Markdown.hs b/test/Tests/Readers/Markdown.hs index 0930deae6..6e38da21a 100644 --- a/test/Tests/Readers/Markdown.hs +++ b/test/Tests/Readers/Markdown.hs @@ -358,7 +358,7 @@ tests = [ testGroup "inline code" para (text "The value of the " <> math "x" <> text "\8217s and the systems\8217 condition.") , test markdownSmart "unclosed double quote" ("**this should \"be bold**" - =?> para (strong "this should \"be bold")) + =?> para (strong "this should \8220be bold")) ] , testGroup "footnotes" [ "indent followed by newline and flush-left text" =: diff --git a/test/command/7216.md b/test/command/7216.md new file mode 100644 index 000000000..cab3b9689 --- /dev/null +++ b/test/command/7216.md @@ -0,0 +1,19 @@ +``` +pandoc -t latex +"This is some text in quotes. Another paragraph by the same speaker follows. The first paragraph should have no close quote. + +"The second paragraph should have open and close quotes." + +| "Open quote on this line, +| Close quote on the next line." +| "Quotes on the same line." +^D +``This is some text in quotes. Another paragraph by the same speaker +follows. The first paragraph should have no close quote. + +``The second paragraph should have open and close quotes.'' + +``Open quote on this line,\\ +Close quote on the next line.''\\ +``Quotes on the same line.'' +``` diff --git a/test/command/pandoc-citeproc-320a.md b/test/command/pandoc-citeproc-320a.md index 79dacfa10..e894a2250 100644 --- a/test/command/pandoc-citeproc-320a.md +++ b/test/command/pandoc-citeproc-320a.md @@ -49,17 +49,13 @@ references: Foo [@item1; @item2; @item3; @item4; @item5; @item6; @item7; @item8]. ^D Foo (al-ʾUdhrī, n.d.; al-ʿUdhrī, n.d.; al-\'Udhrī, n.d.; al-'Udhrī, -n.d.; al-'Udhrī, n.d.; Uch, n.d.; Uebel, n.d.; Zzz, n.d.). +n.d.a, n.d.b; Uch, n.d.; Uebel, n.d.; Zzz, n.d.). ::: {#refs .references .csl-bib-body .hanging-indent} ::: {#ref-item6 .csl-entry} Uch, Ann. n.d. ::: -::: {#ref-item4 .csl-entry} -'Udhrī, Jamīl al-. n.d. -::: - ::: {#ref-item1 .csl-entry} ʾUdhrī, Jamīl al-. n.d. ::: @@ -72,8 +68,12 @@ Uch, Ann. n.d. \'Udhrī, Jamīl al-. n.d. ::: +::: {#ref-item4 .csl-entry} +'Udhrī, Jamīl al-. n.d.a. +::: + ::: {#ref-item5 .csl-entry} -'Udhrī, Jamīl al-. n.d. +---------. n.d.b. ::: ::: {#ref-item7 .csl-entry} |