aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Bieg <mb21@users.noreply.github.com>2019-04-01 19:36:47 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2019-04-01 11:36:47 -0600
commit0fa6951dc15b162b7157739bb0787441aaf48014 (patch)
tree71b2df5a671d4b9793dbb619b872df7793876c67
parent0d1fc7dfffd8044e1d6837cf3cd6c9dd2db6154d (diff)
downloadpandoc-0fa6951dc15b162b7157739bb0787441aaf48014.tar.gz
Dokuwiki Reader fix: parse single curly brace (#5417)
fixes #5416
-rw-r--r--src/Text/Pandoc/Readers/DokuWiki.hs2
-rw-r--r--test/command/5416.md11
2 files changed, 12 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/DokuWiki.hs b/src/Text/Pandoc/Readers/DokuWiki.hs
index 3652dd9f1..60d406df1 100644
--- a/src/Text/Pandoc/Readers/DokuWiki.hs
+++ b/src/Text/Pandoc/Readers/DokuWiki.hs
@@ -358,7 +358,7 @@ parseWidthHeight s = (width, height)
_ -> Nothing
image :: PandocMonad m => DWParser m B.Inlines
-image = parseLink fromRaw "{{" "}}"
+image = try $ parseLink fromRaw "{{" "}}"
where
fromRaw path description =
if linkOnly
diff --git a/test/command/5416.md b/test/command/5416.md
new file mode 100644
index 000000000..02999c631
--- /dev/null
+++ b/test/command/5416.md
@@ -0,0 +1,11 @@
+```
+% echo "{" | pandoc -f dokuwiki -t native
+^D
+[Para [Str "{"]]
+```
+
+```
+% echo "{{" | pandoc -f dokuwiki -t native
+^D
+[Para [Str "{{"]]
+```