mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-26 02:06:32 +00:00
Markdown reader: remove "fallback" for doubleQuote parser.
Previously the parser tried to be efficient -- if no end double
quote was found, it would just return the contents. But this
could backfire in a case like:
**this should "be bold**
since the fallback would return the content `"be bold**` and the
closing boldface delimiter would never be encountered.
This commit is contained in:
@@ -2146,7 +2146,6 @@ singleQuoted = try $ do
|
||||
doubleQuoted :: PandocMonad m => MarkdownParser m (F Inlines)
|
||||
doubleQuoted = try $ do
|
||||
doubleQuoteStart
|
||||
contents <- mconcat <$> many (try $ notFollowedBy doubleQuoteEnd >> inline)
|
||||
withQuoteContext InDoubleQuote (doubleQuoteEnd >> return
|
||||
(fmap B.doubleQuoted . trimInlinesF $ contents))
|
||||
<|> return (return (B.str "\8220") <> contents)
|
||||
withQuoteContext InDoubleQuote $
|
||||
fmap B.doubleQuoted . trimInlinesF . mconcat <$>
|
||||
many1Till inline doubleQuoteEnd
|
||||
|
||||
Reference in New Issue
Block a user