aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-11-25 21:57:18 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2018-11-25 22:29:54 -0800
commitedc651059ee617cf36b511de080a646d2e6513a4 (patch)
tree0f02030d9b7cb94a9cc56322ef744fa971569614 /test
parent839bd3cfe61ef83e0a32c1d30138744a5ddc1aeb (diff)
downloadpandoc-edc651059ee617cf36b511de080a646d2e6513a4.tar.gz
Fix parsing of citations and quotes after parentheses.
Starting with pandoc 2.4, citations and quoted inlines were no longer recognized after parentheses. This is because of commit 9b0bd4ec6f5c9125efb3e36232e6d1f6ac08a728, which is reverted here. The point of that commit was to allow relocation of soft line breaks to before an abbreviation, so that a nonbreaking space could be added after the abbreviation. Now we simply leave the soft line break in place, even though this means that we won't get a nonbreaking space after "Mr." at the end of a line (and in LaTeX this may result in a longer intersentential space). Those who care about this issue should take care not to end lines with an abbreviation, or to insert nonbreaking spaces manually. Closes #5099.
Diffstat (limited to 'test')
-rw-r--r--test/command/4635.md4
-rw-r--r--test/command/5099.md13
-rw-r--r--test/command/md-abbrevs.md11
3 files changed, 15 insertions, 13 deletions
diff --git a/test/command/4635.md b/test/command/4635.md
index 320b83956..ad9af9c67 100644
--- a/test/command/4635.md
+++ b/test/command/4635.md
@@ -19,7 +19,7 @@ foo)
cf.
foo
^D
-[Para [Str "cf.\160foo"]]
+[Para [Str "cf.",SoftBreak,Str "foo"]]
```
```
@@ -27,5 +27,5 @@ foo
a cf.
foo
^D
-[Para [Str "a",SoftBreak,Str "cf.\160foo"]]
+[Para [Str "a",Space,Str "cf.",SoftBreak,Str "foo"]]
```
diff --git a/test/command/5099.md b/test/command/5099.md
new file mode 100644
index 000000000..ab49b9a59
--- /dev/null
+++ b/test/command/5099.md
@@ -0,0 +1,13 @@
+```
+% pandoc -t native
+(@citation
+^D
+[Para [Str "(",Cite [Citation {citationId = "citation", citationPrefix = [], citationSuffix = [], citationMode = AuthorInText, citationNoteNum = 0, citationHash = 0}] [Str "@citation"]]]
+```
+
+```
+% pandoc -t native
+('asd')
+^D
+[Para [Str "(",Quoted SingleQuote [Str "asd"],Str ")"]]
+```
diff --git a/test/command/md-abbrevs.md b/test/command/md-abbrevs.md
index 15f4d6a9a..15ab8a728 100644
--- a/test/command/md-abbrevs.md
+++ b/test/command/md-abbrevs.md
@@ -9,17 +9,6 @@ Mr. Bob
[Para [Str "Mr.\160Bob"]]
```
-Here pandoc readjusts the softbreak so that the nonbreaking
-space can be inserted:
-
-```
-% pandoc -t native
-Hi Mr.
-Bob
-^D
-[Para [Str "Hi",SoftBreak,Str "Mr.\160Bob"]]
-```
-
If you don't want this to happen you can escape the period:
```