diff options
author | John MacFarlane <jgm@berkeley.edu> | 2018-06-13 11:12:10 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-06-13 11:12:10 -0700 |
commit | 48a505c5a07e846c65825994d1be7a403944faf2 (patch) | |
tree | a19a15deff1bd332972a87398a9d75b45af71633 /src/Text/Pandoc | |
parent | e9b81bf5c4f8bb70b33e9fd818082ab5116329ea (diff) | |
download | pandoc-48a505c5a07e846c65825994d1be7a403944faf2.tar.gz |
Markdown reader: allow empty code spans.
E.g. `` ` ` ``.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 2 |
1 files changed, 1 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 '`'))) |