aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-05-29 09:25:07 +0200
committerGitHub <noreply@github.com>2017-05-29 09:25:07 +0200
commit345bf8b6156938e60562f1f0f6b6e3354575cfcd (patch)
tree51c9011c4c1412c0f0bbc7b85e06754d9f87ff78 /test
parentafb551429bb95332f0ccdf882d0dbe8a59aa652a (diff)
parentbfd5c6b172b7b4cc471b1ed80673bac545604f62 (diff)
downloadpandoc-345bf8b6156938e60562f1f0f6b6e3354575cfcd.tar.gz
Merge pull request #3699 from herwigstuetz/org-ref-cites
Org: Fix reading of citations before punctuation
Diffstat (limited to 'test')
-rw-r--r--test/Tests/Readers/Org.hs36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/Tests/Readers/Org.hs b/test/Tests/Readers/Org.hs
index 37ad2462b..3302e0c3e 100644
--- a/test/Tests/Readers/Org.hs
+++ b/test/Tests/Readers/Org.hs
@@ -334,6 +334,18 @@ tests =
}
in (para $ cite [citation] "cite:pandoc")
+ , "Org-ref simple citation with underscores" =:
+ "cite:pandoc_org_ref" =?>
+ let citation = Citation
+ { citationId = "pandoc_org_ref"
+ , citationPrefix = mempty
+ , citationSuffix = mempty
+ , citationMode = AuthorInText
+ , citationNoteNum = 0
+ , citationHash = 0
+ }
+ in (para $ cite [citation] "cite:pandoc_org_ref")
+
, "Org-ref simple citation succeeded by comma" =:
"cite:pandoc," =?>
let citation = Citation
@@ -346,6 +358,30 @@ tests =
}
in (para $ cite [citation] "cite:pandoc" <> str ",")
+ , "Org-ref simple citation succeeded by dot" =:
+ "cite:pandoc." =?>
+ let citation = Citation
+ { citationId = "pandoc"
+ , citationPrefix = mempty
+ , citationSuffix = mempty
+ , citationMode = AuthorInText
+ , citationNoteNum = 0
+ , citationHash = 0
+ }
+ in (para $ cite [citation] "cite:pandoc" <> str ".")
+
+ , "Org-ref simple citation succeeded by colon" =:
+ "cite:pandoc:" =?>
+ let citation = Citation
+ { citationId = "pandoc"
+ , citationPrefix = mempty
+ , citationSuffix = mempty
+ , citationMode = AuthorInText
+ , citationNoteNum = 0
+ , citationHash = 0
+ }
+ in (para $ cite [citation] "cite:pandoc" <> str ":")
+
, "Org-ref simple citep citation" =:
"citep:pandoc" =?>
let citation = Citation