aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs2
-rw-r--r--test/command/empty-inline-code.txt6
2 files changed, 7 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index 156b2b622..0cd9ce63f 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -1591,7 +1591,7 @@ code = try $ do
starts <- many1 (char '`')
skipSpaces
result <- (trim . concat) <$>
- many1Till (many1 (noneOf "`\n") <|> many1 (char '`') <|>
+ manyTill (many1 (noneOf "`\n") <|> many1 (char '`') <|>
(char '\n' >> notFollowedBy' blankline >> return " "))
(try (skipSpaces >> count (length starts) (char '`') >>
notFollowedBy (char '`')))
diff --git a/test/command/empty-inline-code.txt b/test/command/empty-inline-code.txt
new file mode 100644
index 000000000..b57072a44
--- /dev/null
+++ b/test/command/empty-inline-code.txt
@@ -0,0 +1,6 @@
+```
+% pandoc -t native
+` `
+^D
+[Code ("",[],[]) ""]
+```