diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs index 2f6189104..37ab0adaa 100644 --- a/src/Text/Pandoc/Parsing.hs +++ b/src/Text/Pandoc/Parsing.hs @@ -1447,7 +1447,7 @@ singleQuoteStart = do guard =<< notAfterString try $ do charOrRef "'\8216\145" - notFollowedBy (satisfy isSpaceChar) + void $ lookAhead (satisfy (not . isSpaceChar)) singleQuoteEnd :: Stream s m Char => ParserT s st m () @@ -1463,7 +1463,7 @@ doubleQuoteStart = do failIfInQuoteContext InDoubleQuote guard =<< notAfterString try $ do charOrRef "\"\8220\147" - notFollowedBy (satisfy isSpaceChar) + void $ lookAhead (satisfy (not . isSpaceChar)) doubleQuoteEnd :: Stream s m Char => ParserT s st m () diff --git a/test/command/2103.md b/test/command/2103.md new file mode 100644 index 000000000..14a522a5e --- /dev/null +++ b/test/command/2103.md @@ -0,0 +1,8 @@ +``` +pandoc -t latex +| A happy pandoc user said "fix this bug please +| or I'll go crazy!" +^D +A happy pandoc user said ``fix this bug please\\ +or I'll go crazy!'' +```