Markdown reader: allow empty code spans.
E.g. `` ` ` ``.
This commit is contained in:
parent
e9b81bf5c4
commit
48a505c5a0
2 changed files with 7 additions and 1 deletions
|
@ -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 '`')))
|
||||
|
|
6
test/command/empty-inline-code.txt
Normal file
6
test/command/empty-inline-code.txt
Normal file
|
@ -0,0 +1,6 @@
|
|||
```
|
||||
% pandoc -t native
|
||||
` `
|
||||
^D
|
||||
[Code ("",[],[]) ""]
|
||||
```
|
Loading…
Add table
Reference in a new issue