summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-01-14 12:23:16 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2018-01-14 12:24:21 -0800
commitd9584d73f94501787026c57b77d217e51f21505d (patch)
tree4ca0544a859f26486ae33d3655dbe9109650bfbc /test
parentcd80b8d76f4a09eee12dab856a1530d549c062ac (diff)
Markdown reader: Improved inlinesInBalancedBrackets.
The change both improves performance and fixes a regression whereby normal citations inside inline notes were not parsed correctly. Closes jgm/pandoc-citeproc#315.
Diffstat (limited to 'test')
-rw-r--r--test/Tests/Readers/Markdown.hs2
-rw-r--r--test/command/cite-in-inline-note.md6
2 files changed, 7 insertions, 1 deletions
diff --git a/test/Tests/Readers/Markdown.hs b/test/Tests/Readers/Markdown.hs
index c331eb3e9..1cd32b87d 100644
--- a/test/Tests/Readers/Markdown.hs
+++ b/test/Tests/Readers/Markdown.hs
@@ -200,7 +200,7 @@ tests = [ testGroup "inline code"
":smile: and :+1:" =?> para (text "😄 and 👍")
]
, "unbalanced brackets" =:
- "[[[[[[[[[[[hi" =?> para (text "[[[[[[[[[[[hi")
+ "[[[[[[[[[[[[hi" =?> para (text "[[[[[[[[[[[[hi")
, testGroup "backslash escapes"
[ "in URL" =:
"[hi](/there\\))"
diff --git a/test/command/cite-in-inline-note.md b/test/command/cite-in-inline-note.md
new file mode 100644
index 000000000..069484eed
--- /dev/null
+++ b/test/command/cite-in-inline-note.md
@@ -0,0 +1,6 @@
+```
+% pandoc -t native
+foo^[bar [@doe]]
+^D
+[Para [Str "foo",Note [Para [Str "bar",Space,Cite [Citation {citationId = "doe", citationPrefix = [], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0}] [Str "[@doe]"]]]]]
+```