git.iko.soy/typeable/pandoc
on master help sign in
Parsing: Lookahead for non-whitespace after single/double quote start.

Closes #4637.

commit81881ce4708f06ca53088d95ff249b48f2b2e88d authorJohn MacFarlane <jgm@berkeley.edu> dateWed 9 May 2018, 10:00 (8 years ago) parent5f33d2e
2 files changed+10−2
src/Text/Pandoc/Parsing.hs+4−2 test/command/4637.md+6
src/Text/Pandoc/Parsing.hs+4−2
@@ -1366,7 +1366,9 @@ singleQuoteStart = do
13661366 failIfInQuoteContext InSingleQuote
13671367 -- single quote start can't be right after str
13681368 guard =<< notAfterString
1369− () <$ charOrRef "'\8216\145"
1369+ try $ do
1370+ charOrRef "'\8216\145"
1371+ notFollowedBy (oneOf [' ', '\t', '\n'])
13701372
13711373singleQuoteEnd :: Stream s m Char
13721374 => ParserT s st m ()
@@ -1379,7 +1381,7 @@ doubleQuoteStart :: (HasQuoteContext st m, Stream s m Char)
13791381doubleQuoteStart = do
13801382 failIfInQuoteContext InDoubleQuote
13811383 try $ do charOrRef "\"\8220\147"
1382− notFollowedBy . satisfy $ flip elem [' ', '\t', '\n']
1384+ notFollowedBy (oneOf [' ', '\t', '\n'])
13831385
13841386doubleQuoteEnd :: Stream s m Char
13851387 => ParserT s st m ()
test/command/4637.mdnew file+6
@@ -0,0 +1,6 @@
1+```
2+% pandoc -t latex
3+more \indextext{dogs}' than \indextext{cats}'
4+^D
5+more \indextext{dogs}' than \indextext{cats}'
6+```