git.iko.soy/typeable/pandoc
on master help sign in
Markdown reader: allow empty code spans.
48a505cJohn MacFarlane
src/Text/Pandoc/Readers/Markdown.hs+1−1
@@ -1591,7 +1591,7 @@ code = try $ do
1591 starts <- many1 (char '`')
1591 starts <- many1 (char '`')
1592 skipSpaces
1592 skipSpaces
1593 result <- (trim . concat) <$>
1593 result <- (trim . concat) <$>
1594− many1Till (many1 (noneOf "`\n") <|> many1 (char '`') <|>
1594+ manyTill (many1 (noneOf "`\n") <|> many1 (char '`') <|>
1595 (char '\n' >> notFollowedBy' blankline >> return " "))
1595 (char '\n' >> notFollowedBy' blankline >> return " "))
1596 (try (skipSpaces >> count (length starts) (char '`') >>
1596 (try (skipSpaces >> count (length starts) (char '`') >>
1597 notFollowedBy (char '`')))
1597 notFollowedBy (char '`')))
test/command/empty-inline-code.txtnew file+6
@@ -0,0 +1,6 @@
1+```
2+% pandoc -t native
3+` `
4+^D
5+[Code ("",[],[]) ""]
6+```