diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-05-14 06:37:29 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-05-14 06:37:29 -0700 |
commit | b5959b20073f04b7b5ecb19e2ab0ce56a5ecadb0 (patch) | |
tree | 4f05dcecdf9cae5fb6bf123bade09c71e77b316c /tests/Tests/Readers | |
parent | 222a51bf99bc6b0bfc6be6ebc03159a0ad875e4f (diff) | |
parent | ceeb701c254c6dc4c054e10dd151d9ef6f751ad7 (diff) | |
download | pandoc-b5959b20073f04b7b5ecb19e2ab0ce56a5ecadb0.tar.gz |
Merge pull request #1297 from tarleb/citations
Org reader: support Pandocs citation extension
Diffstat (limited to 'tests/Tests/Readers')
-rw-r--r-- | tests/Tests/Readers/Org.hs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/Tests/Readers/Org.hs b/tests/Tests/Readers/Org.hs index 4ef7a7731..ca97ba348 100644 --- a/tests/Tests/Readers/Org.hs +++ b/tests/Tests/Readers/Org.hs @@ -225,6 +225,28 @@ tests = ] ) "echo 'Hello, World'") + + , "Citation" =: + "[@nonexistent]" =?> + let citation = Citation + { citationId = "nonexistent" + , citationPrefix = [] + , citationSuffix = [] + , citationMode = NormalCitation + , citationNoteNum = 0 + , citationHash = 0} + in (para $ cite [citation] "[@nonexistent]") + + , "Citation containing text" =: + "[see @item1 p. 34-35]" =?> + let citation = Citation + { citationId = "item1" + , citationPrefix = [Str "see"] + , citationSuffix = [Space ,Str "p.",Space,Str "34-35"] + , citationMode = NormalCitation + , citationNoteNum = 0 + , citationHash = 0} + in (para $ cite [citation] "[see @item1 p. 34-35]") ] , testGroup "Meta Information" $ |