aboutsummaryrefslogtreecommitdiff
path: root/test/markdown-citations.native
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-09-28 21:17:53 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2021-09-28 21:17:53 -0700
commit0bdcf415e4eff83ad8e35c1d41c8a28e0bbd5da1 (patch)
treec9bda08418e67755254ad2d1d2e95dd691bd1902 /test/markdown-citations.native
parent8018179b3df34cd7fdbd77c7a08b21fd8d5b5b31 (diff)
downloadpandoc-0bdcf415e4eff83ad8e35c1d41c8a28e0bbd5da1.tar.gz
Switch from pretty-simple to pretty-show for native output.
Update tests. Reason: it turns out that the native output generated by pretty-simple isn't always readable by the native reader. According to https://github.com/cdepillabout/pretty-simple/issues/99 it is not a design goal of the library that the rendered values be readable using 'read'. This makes it unsuitable for our purposes. pretty-show is a bit slower and it uses 4-space indents (non-configurable), but it doesn't have this serious drawback.
Diffstat (limited to 'test/markdown-citations.native')
-rw-r--r--test/markdown-citations.native971
1 files changed, 477 insertions, 494 deletions
diff --git a/test/markdown-citations.native b/test/markdown-citations.native
index bafdb0bbf..f37fd82fb 100644
--- a/test/markdown-citations.native
+++ b/test/markdown-citations.native
@@ -1,539 +1,522 @@
-[ Header 1
- ( "pandoc-with-citeproc-hs", [], [] )
- [ Str "Pandoc", Space, Str "with", Space, Str "citeproc-hs" ]
-, BulletList
- [
- [ Para
- [ Cite
- [ Citation
- { citationId = "nonexistent"
- , citationPrefix = []
- , citationSuffix = []
- , citationMode = NormalCitation
- , citationNoteNum = 1
- , citationHash = 0
- }
- ]
- [ Str "[@nonexistent]" ]
- ]
+[ Header
+ 1
+ ( "pandoc-with-citeproc-hs" , [] , [] )
+ [ Str "Pandoc"
+ , Space
+ , Str "with"
+ , Space
+ , Str "citeproc-hs"
]
- ,
- [ Para
- [ Cite
- [ Citation
- { citationId = "nonexistent"
- , citationPrefix = []
- , citationSuffix = []
- , citationMode = AuthorInText
- , citationNoteNum = 2
- , citationHash = 0
- }
- ]
- [ Str "@nonexistent" ]
+, BulletList
+ [ [ Para
+ [ Cite
+ [ Citation
+ { citationId = "nonexistent"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = NormalCitation
+ , citationNoteNum = 1
+ , citationHash = 0
+ }
+ ]
+ [ Str "[@nonexistent]" ]
+ ]
]
- ]
- ,
- [ Para
- [ Cite
- [ Citation
- { citationId = "item1"
- , citationPrefix = []
- , citationSuffix = []
- , citationMode = AuthorInText
- , citationNoteNum = 3
- , citationHash = 0
- }
- ]
- [ Str "@item1" ]
- , Space
- , Str "says"
- , Space
- , Str "blah."
+ , [ Para
+ [ Cite
+ [ Citation
+ { citationId = "nonexistent"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = AuthorInText
+ , citationNoteNum = 2
+ , citationHash = 0
+ }
+ ]
+ [ Str "@nonexistent" ]
+ ]
]
- ]
- ,
- [ Para
- [ Cite
- [ Citation
- { citationId = "item1"
- , citationPrefix = []
- , citationSuffix =
- [ Str "p.\160\&30" ]
- , citationMode = AuthorInText
- , citationNoteNum = 4
- , citationHash = 0
- }
- ]
- [ Str "@item1", Space, Str "[p.", Space, Str "30]" ]
- , Space
- , Str "says"
- , Space
- , Str "blah."
+ , [ Para
+ [ Cite
+ [ Citation
+ { citationId = "item1"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = AuthorInText
+ , citationNoteNum = 3
+ , citationHash = 0
+ }
+ ]
+ [ Str "@item1" ]
+ , Space
+ , Str "says"
+ , Space
+ , Str "blah."
+ ]
]
- ]
- ,
- [ Para
- [ Cite
- [ Citation
- { citationId = "item1"
- , citationPrefix = []
- , citationSuffix =
- [ Str "p.\160\&30,"
- , Space
- , Str "with"
- , Space
- , Str "suffix"
- ]
- , citationMode = AuthorInText
- , citationNoteNum = 5
- , citationHash = 0
- }
- ]
- [ Str "@item1"
- , Space
- , Str "[p."
- , Space
- , Str "30,"
- , Space
- , Str "with"
- , Space
- , Str "suffix]"
- ]
- , Space
- , Str "says"
- , Space
- , Str "blah."
+ , [ Para
+ [ Cite
+ [ Citation
+ { citationId = "item1"
+ , citationPrefix = []
+ , citationSuffix = [ Str "p.\160\&30" ]
+ , citationMode = AuthorInText
+ , citationNoteNum = 4
+ , citationHash = 0
+ }
+ ]
+ [ Str "@item1" , Space , Str "[p." , Space , Str "30]" ]
+ , Space
+ , Str "says"
+ , Space
+ , Str "blah."
+ ]
]
- ]
- ,
- [ Para
- [ Cite
- [ Citation
- { citationId = "item1"
- , citationPrefix = []
- , citationSuffix = []
- , citationMode = AuthorInText
- , citationNoteNum = 6
- , citationHash = 0
- }
- , Citation
- { citationId = "item2"
- , citationPrefix = []
- , citationSuffix =
- [ Space, Str "p.\160\&30" ]
- , citationMode = SuppressAuthor
- , citationNoteNum = 6
- , citationHash = 0
- }
- , Citation
- { citationId = "\1087\1091\1085\1082\1090\&3"
- , citationPrefix =
- [ Str "see", Space, Str "also" ]
- , citationSuffix = []
- , citationMode = NormalCitation
- , citationNoteNum = 6
- , citationHash = 0
- }
- ]
- [ Str "@item1"
- , Space
- , Str "[-@item2"
- , Space
- , Str "p."
- , Space
- , Str "30;"
- , Space
- , Str "see"
- , Space
- , Str "also"
- , Space
- , Str "@\1087\1091\1085\1082\1090\&3]"
- ]
- , Space
- , Str "says"
- , Space
- , Str "blah."
+ , [ Para
+ [ Cite
+ [ Citation
+ { citationId = "item1"
+ , citationPrefix = []
+ , citationSuffix =
+ [ Str "p.\160\&30,"
+ , Space
+ , Str "with"
+ , Space
+ , Str "suffix"
+ ]
+ , citationMode = AuthorInText
+ , citationNoteNum = 5
+ , citationHash = 0
+ }
+ ]
+ [ Str "@item1"
+ , Space
+ , Str "[p."
+ , Space
+ , Str "30,"
+ , Space
+ , Str "with"
+ , Space
+ , Str "suffix]"
+ ]
+ , Space
+ , Str "says"
+ , Space
+ , Str "blah."
+ ]
]
- ]
- ,
- [ Para
- [ Str "In"
- , Space
- , Str "a"
- , Space
- , Str "note."
- , Note
- [ Para
+ , [ Para
[ Cite
- [ Citation
- { citationId = "\1087\1091\1085\1082\1090\&3"
- , citationPrefix = []
- , citationSuffix =
- [ Str "p.\160\&12" ]
- , citationMode = AuthorInText
- , citationNoteNum = 7
- , citationHash = 0
- }
- ]
- [ Str "@\1087\1091\1085\1082\1090\&3"
- , Space
- , Str "[p."
- , Space
- , Str "12]"
- ]
+ [ Citation
+ { citationId = "item1"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = AuthorInText
+ , citationNoteNum = 6
+ , citationHash = 0
+ }
+ , Citation
+ { citationId = "item2"
+ , citationPrefix = []
+ , citationSuffix = [ Space , Str "p.\160\&30" ]
+ , citationMode = SuppressAuthor
+ , citationNoteNum = 6
+ , citationHash = 0
+ }
+ , Citation
+ { citationId = "\1087\1091\1085\1082\1090\&3"
+ , citationPrefix = [ Str "see" , Space , Str "also" ]
+ , citationSuffix = []
+ , citationMode = NormalCitation
+ , citationNoteNum = 6
+ , citationHash = 0
+ }
+ ]
+ [ Str "@item1"
+ , Space
+ , Str "[-@item2"
+ , Space
+ , Str "p."
+ , Space
+ , Str "30;"
+ , Space
+ , Str "see"
+ , Space
+ , Str "also"
+ , Space
+ , Str "@\1087\1091\1085\1082\1090\&3]"
+ ]
, Space
- , Str "and"
+ , Str "says"
+ , Space
+ , Str "blah."
+ ]
+ ]
+ , [ Para
+ [ Str "In"
, Space
, Str "a"
, Space
- , Str "citation"
+ , Str "note."
+ , Note
+ [ Para
+ [ Cite
+ [ Citation
+ { citationId = "\1087\1091\1085\1082\1090\&3"
+ , citationPrefix = []
+ , citationSuffix = [ Str "p.\160\&12" ]
+ , citationMode = AuthorInText
+ , citationNoteNum = 7
+ , citationHash = 0
+ }
+ ]
+ [ Str "@\1087\1091\1085\1082\1090\&3"
+ , Space
+ , Str "[p."
+ , Space
+ , Str "12]"
+ ]
+ , Space
+ , Str "and"
+ , Space
+ , Str "a"
+ , Space
+ , Str "citation"
+ , Space
+ , Str "without"
+ , Space
+ , Str "locators"
+ , Space
+ , Cite
+ [ Citation
+ { citationId = "\1087\1091\1085\1082\1090\&3"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = NormalCitation
+ , citationNoteNum = 7
+ , citationHash = 0
+ }
+ ]
+ [ Str "[@\1087\1091\1085\1082\1090\&3]" ]
+ , Str "."
+ ]
+ ]
+ ]
+ ]
+ , [ Para
+ [ Str "A"
, Space
- , Str "without"
+ , Str "citation"
, Space
- , Str "locators"
+ , Str "group"
, Space
, Cite
- [ Citation
- { citationId = "\1087\1091\1085\1082\1090\&3"
- , citationPrefix = []
- , citationSuffix = []
- , citationMode = NormalCitation
- , citationNoteNum = 7
- , citationHash = 0
- }
- ]
- [ Str "[@\1087\1091\1085\1082\1090\&3]" ]
+ [ Citation
+ { citationId = "item1"
+ , citationPrefix = [ Str "see" ]
+ , citationSuffix = [ Space , Str "chap.\160\&3" ]
+ , citationMode = NormalCitation
+ , citationNoteNum = 8
+ , citationHash = 0
+ }
+ , Citation
+ { citationId = "\1087\1091\1085\1082\1090\&3"
+ , citationPrefix = [ Str "also" ]
+ , citationSuffix = [ Space , Str "p.\160\&34-35" ]
+ , citationMode = NormalCitation
+ , citationNoteNum = 8
+ , citationHash = 0
+ }
+ ]
+ [ Str "[see"
+ , Space
+ , Str "@item1"
+ , Space
+ , Str "chap."
+ , Space
+ , Str "3;"
+ , Space
+ , Str "also"
+ , Space
+ , Str "@\1087\1091\1085\1082\1090\&3"
+ , Space
+ , Str "p."
+ , Space
+ , Str "34-35]"
+ ]
, Str "."
]
- ]
- ]
- ]
- ,
- [ Para
- [ Str "A"
- , Space
- , Str "citation"
- , Space
- , Str "group"
- , Space
- , Cite
- [ Citation
- { citationId = "item1"
- , citationPrefix =
- [ Str "see" ]
- , citationSuffix =
- [ Space, Str "chap.\160\&3" ]
- , citationMode = NormalCitation
- , citationNoteNum = 8
- , citationHash = 0
- }
- , Citation
- { citationId = "\1087\1091\1085\1082\1090\&3"
- , citationPrefix =
- [ Str "also" ]
- , citationSuffix =
- [ Space, Str "p.\160\&34-35" ]
- , citationMode = NormalCitation
- , citationNoteNum = 8
- , citationHash = 0
- }
- ]
- [ Str "[see"
- , Space
- , Str "@item1"
- , Space
- , Str "chap."
- , Space
- , Str "3;"
- , Space
- , Str "also"
- , Space
- , Str "@\1087\1091\1085\1082\1090\&3"
- , Space
- , Str "p."
- , Space
- , Str "34-35]"
- ]
- , Str "."
- ]
- ]
- ,
- [ Para
- [ Str "Another"
- , Space
- , Str "one"
- , Space
- , Cite
- [ Citation
- { citationId = "item1"
- , citationPrefix =
- [ Str "see" ]
- , citationSuffix =
- [ Space, Str "p.\160\&34-35" ]
- , citationMode = NormalCitation
- , citationNoteNum = 9
- , citationHash = 0
- }
- ]
- [ Str "[see"
- , Space
- , Str "@item1"
- , Space
- , Str "p."
- , Space
- , Str "34-35]"
- ]
- , Str "."
]
- ]
- ,
- [ Para
- [ Str "And"
- , Space
- , Str "another"
- , Space
- , Str "one"
- , Space
- , Str "in"
- , Space
- , Str "a"
- , Space
- , Str "note."
- , Note
- [ Para
- [ Str "Some"
- , Space
- , Str "citations"
+ , [ Para
+ [ Str "Another"
+ , Space
+ , Str "one"
, Space
, Cite
- [ Citation
- { citationId = "item1"
- , citationPrefix =
- [ Str "see" ]
- , citationSuffix =
- [ Space, Str "chap.\160\&3" ]
- , citationMode = NormalCitation
- , citationNoteNum = 10
- , citationHash = 0
- }
- , Citation
- { citationId = "\1087\1091\1085\1082\1090\&3"
- , citationPrefix = []
- , citationSuffix = []
- , citationMode = NormalCitation
- , citationNoteNum = 10
- , citationHash = 0
- }
- , Citation
- { citationId = "item2"
- , citationPrefix = []
- , citationSuffix = []
- , citationMode = NormalCitation
- , citationNoteNum = 10
- , citationHash = 0
- }
- ]
- [ Str "[see"
- , Space
- , Str "@item1"
- , Space
- , Str "chap."
- , Space
- , Str "3;"
- , Space
- , Str "@\1087\1091\1085\1082\1090\&3;"
- , Space
- , Str "@item2]"
- ]
+ [ Citation
+ { citationId = "item1"
+ , citationPrefix = [ Str "see" ]
+ , citationSuffix = [ Space , Str "p.\160\&34-35" ]
+ , citationMode = NormalCitation
+ , citationNoteNum = 9
+ , citationHash = 0
+ }
+ ]
+ [ Str "[see"
+ , Space
+ , Str "@item1"
+ , Space
+ , Str "p."
+ , Space
+ , Str "34-35]"
+ ]
, Str "."
]
- ]
- ]
- ]
- ,
- [ Para
- [ Str "Citation"
- , Space
- , Str "with"
- , Space
- , Str "a"
- , Space
- , Str "suffix"
- , Space
- , Str "and"
- , Space
- , Str "locator"
- , Space
- , Cite
- [ Citation
- { citationId = "item1"
- , citationPrefix = []
- , citationSuffix =
- [ Space
- , Str "pp.\160\&33,"
- , Space
- , Str "35-37,"
- , Space
- , Str "and"
- , Space
- , Str "nowhere"
- , Space
- , Str "else"
- ]
- , citationMode = NormalCitation
- , citationNoteNum = 11
- , citationHash = 0
- }
- ]
- [ Str "[@item1"
- , Space
- , Str "pp."
- , Space
- , Str "33,"
- , Space
- , Str "35-37,"
- , Space
- , Str "and"
- , Space
- , Str "nowhere"
- , Space
- , Str "else]"
- ]
- , Str "."
]
- ]
- ,
- [ Para
- [ Str "Citation"
- , Space
- , Str "with"
- , Space
- , Str "suffix"
- , Space
- , Str "only"
- , Space
- , Cite
- [ Citation
- { citationId = "item1"
- , citationPrefix = []
- , citationSuffix =
- [ Space
- , Str "and"
- , Space
- , Str "nowhere"
- , Space
- , Str "else"
- ]
- , citationMode = NormalCitation
- , citationNoteNum = 12
- , citationHash = 0
- }
- ]
- [ Str "[@item1"
- , Space
- , Str "and"
- , Space
- , Str "nowhere"
- , Space
- , Str "else]"
- ]
- , Str "."
- ]
- ]
- ,
- [ Para
- [ Str "Now"
- , Space
- , Str "some"
- , Space
- , Str "modifiers."
- , Note
- [ Para
- [ Str "Like"
+ , [ Para
+ [ Str "And"
+ , Space
+ , Str "another"
+ , Space
+ , Str "one"
+ , Space
+ , Str "in"
, Space
, Str "a"
, Space
- , Str "citation"
+ , Str "note."
+ , Note
+ [ Para
+ [ Str "Some"
+ , Space
+ , Str "citations"
+ , Space
+ , Cite
+ [ Citation
+ { citationId = "item1"
+ , citationPrefix = [ Str "see" ]
+ , citationSuffix =
+ [ Space , Str "chap.\160\&3" ]
+ , citationMode = NormalCitation
+ , citationNoteNum = 10
+ , citationHash = 0
+ }
+ , Citation
+ { citationId = "\1087\1091\1085\1082\1090\&3"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = NormalCitation
+ , citationNoteNum = 10
+ , citationHash = 0
+ }
+ , Citation
+ { citationId = "item2"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = NormalCitation
+ , citationNoteNum = 10
+ , citationHash = 0
+ }
+ ]
+ [ Str "[see"
+ , Space
+ , Str "@item1"
+ , Space
+ , Str "chap."
+ , Space
+ , Str "3;"
+ , Space
+ , Str "@\1087\1091\1085\1082\1090\&3;"
+ , Space
+ , Str "@item2]"
+ ]
+ , Str "."
+ ]
+ ]
+ ]
+ ]
+ , [ Para
+ [ Str "Citation"
, Space
- , Str "without"
+ , Str "with"
, Space
- , Str "author:"
+ , Str "a"
, Space
- , Cite
- [ Citation
- { citationId = "item1"
- , citationPrefix = []
- , citationSuffix = []
- , citationMode = SuppressAuthor
- , citationNoteNum = 13
- , citationHash = 0
- }
- ]
- [ Str "[-@item1]" ]
- , Str ","
+ , Str "suffix"
, Space
, Str "and"
, Space
- , Str "now"
+ , Str "locator"
, Space
- , Str "Doe"
+ , Cite
+ [ Citation
+ { citationId = "item1"
+ , citationPrefix = []
+ , citationSuffix =
+ [ Space
+ , Str "pp.\160\&33,"
+ , Space
+ , Str "35-37,"
+ , Space
+ , Str "and"
+ , Space
+ , Str "nowhere"
+ , Space
+ , Str "else"
+ ]
+ , citationMode = NormalCitation
+ , citationNoteNum = 11
+ , citationHash = 0
+ }
+ ]
+ [ Str "[@item1"
+ , Space
+ , Str "pp."
+ , Space
+ , Str "33,"
+ , Space
+ , Str "35-37,"
+ , Space
+ , Str "and"
+ , Space
+ , Str "nowhere"
+ , Space
+ , Str "else]"
+ ]
+ , Str "."
+ ]
+ ]
+ , [ Para
+ [ Str "Citation"
, Space
, Str "with"
, Space
- , Str "a"
+ , Str "suffix"
, Space
- , Str "locator"
+ , Str "only"
, Space
, Cite
- [ Citation
- { citationId = "item2"
- , citationPrefix = []
- , citationSuffix =
- [ Space, Str "p.\160\&44" ]
- , citationMode = SuppressAuthor
- , citationNoteNum = 13
- , citationHash = 0
- }
- ]
- [ Str "[-@item2", Space, Str "p.", Space, Str "44]" ]
+ [ Citation
+ { citationId = "item1"
+ , citationPrefix = []
+ , citationSuffix =
+ [ Space
+ , Str "and"
+ , Space
+ , Str "nowhere"
+ , Space
+ , Str "else"
+ ]
+ , citationMode = NormalCitation
+ , citationNoteNum = 12
+ , citationHash = 0
+ }
+ ]
+ [ Str "[@item1"
+ , Space
+ , Str "and"
+ , Space
+ , Str "nowhere"
+ , Space
+ , Str "else]"
+ ]
, Str "."
]
- ]
]
- ]
- ,
- [ Para
- [ Str "With"
- , Space
- , Str "some"
- , Space
- , Str "markup"
- , Space
- , Cite
- [ Citation
- { citationId = "item1"
- , citationPrefix =
- [ Emph [ Str "see" ] ]
- , citationSuffix =
- [ Space, Str "p.\160", Strong [ Str "32" ] ]
- , citationMode = NormalCitation
- , citationNoteNum = 14
- , citationHash = 0
- }
- ]
- [ Str "[*see*"
- , Space
- , Str "@item1"
- , Space
- , Str "p."
- , Space
- , Str "**32**]"
- ]
- , Str "."
+ , [ Para
+ [ Str "Now"
+ , Space
+ , Str "some"
+ , Space
+ , Str "modifiers."
+ , Note
+ [ Para
+ [ Str "Like"
+ , Space
+ , Str "a"
+ , Space
+ , Str "citation"
+ , Space
+ , Str "without"
+ , Space
+ , Str "author:"
+ , Space
+ , Cite
+ [ Citation
+ { citationId = "item1"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = SuppressAuthor
+ , citationNoteNum = 13
+ , citationHash = 0
+ }
+ ]
+ [ Str "[-@item1]" ]
+ , Str ","
+ , Space
+ , Str "and"
+ , Space
+ , Str "now"
+ , Space
+ , Str "Doe"
+ , Space
+ , Str "with"
+ , Space
+ , Str "a"
+ , Space
+ , Str "locator"
+ , Space
+ , Cite
+ [ Citation
+ { citationId = "item2"
+ , citationPrefix = []
+ , citationSuffix =
+ [ Space , Str "p.\160\&44" ]
+ , citationMode = SuppressAuthor
+ , citationNoteNum = 13
+ , citationHash = 0
+ }
+ ]
+ [ Str "[-@item2"
+ , Space
+ , Str "p."
+ , Space
+ , Str "44]"
+ ]
+ , Str "."
+ ]
+ ]
+ ]
+ ]
+ , [ Para
+ [ Str "With"
+ , Space
+ , Str "some"
+ , Space
+ , Str "markup"
+ , Space
+ , Cite
+ [ Citation
+ { citationId = "item1"
+ , citationPrefix = [ Emph [ Str "see" ] ]
+ , citationSuffix =
+ [ Space , Str "p.\160" , Strong [ Str "32" ] ]
+ , citationMode = NormalCitation
+ , citationNoteNum = 14
+ , citationHash = 0
+ }
+ ]
+ [ Str "[*see*"
+ , Space
+ , Str "@item1"
+ , Space
+ , Str "p."
+ , Space
+ , Str "**32**]"
+ ]
+ , Str "."
+ ]
]
]
- ]
-, Header 1
- ( "references", [], [] )
- [ Str "References" ]
+, Header 1 ( "references" , [] , [] ) [ Str "References" ]
]