git.iko.soy/typeable/pandoc
on master help sign in
Further improvements in smart quotes.
d14c5f9John MacFarlane
src/Text/Pandoc/Parsing.hs+2−2
@@ -1447,7 +1447,7 @@ singleQuoteStart = do
1447 guard =<< notAfterString
1447 guard =<< notAfterString
1448 try $ do
1448 try $ do
1449 charOrRef "'\8216\145"
1449 charOrRef "'\8216\145"
1450− notFollowedBy (satisfy isSpaceChar)
1450+ void $ lookAhead (satisfy (not . isSpaceChar))
1451
1451
1452singleQuoteEnd :: Stream s m Char
1452singleQuoteEnd :: Stream s m Char
1453 => ParserT s st m ()
1453 => ParserT s st m ()
@@ -1463,7 +1463,7 @@ doubleQuoteStart = do
1463 failIfInQuoteContext InDoubleQuote
1463 failIfInQuoteContext InDoubleQuote
1464 guard =<< notAfterString
1464 guard =<< notAfterString
1465 try $ do charOrRef "\"\8220\147"
1465 try $ do charOrRef "\"\8220\147"
1466− notFollowedBy (satisfy isSpaceChar)
1466+ void $ lookAhead (satisfy (not . isSpaceChar))
1467
1467
1468doubleQuoteEnd :: Stream s m Char
1468doubleQuoteEnd :: Stream s m Char
1469 => ParserT s st m ()
1469 => ParserT s st m ()
test/command/2103.mdnew file+8
@@ -0,0 +1,8 @@
1+```
2+pandoc -t latex
3+| A happy pandoc user said "fix this bug please
4+| or I'll go crazy!"
5+^D
6+A happy pandoc user said ``fix this bug please\\
7+or I'll go crazy!''
8+```