Parsing: Lookahead for non-whitespace after single/double quote start.
Closes #4637.
This commit is contained in:
parent
5f33d2e0cd
commit
81881ce470
2 changed files with 10 additions and 2 deletions
|
@ -1366,7 +1366,9 @@ singleQuoteStart = do
|
|||
failIfInQuoteContext InSingleQuote
|
||||
-- single quote start can't be right after str
|
||||
guard =<< notAfterString
|
||||
() <$ charOrRef "'\8216\145"
|
||||
try $ do
|
||||
charOrRef "'\8216\145"
|
||||
notFollowedBy (oneOf [' ', '\t', '\n'])
|
||||
|
||||
singleQuoteEnd :: Stream s m Char
|
||||
=> ParserT s st m ()
|
||||
|
@ -1379,7 +1381,7 @@ doubleQuoteStart :: (HasQuoteContext st m, Stream s m Char)
|
|||
doubleQuoteStart = do
|
||||
failIfInQuoteContext InDoubleQuote
|
||||
try $ do charOrRef "\"\8220\147"
|
||||
notFollowedBy . satisfy $ flip elem [' ', '\t', '\n']
|
||||
notFollowedBy (oneOf [' ', '\t', '\n'])
|
||||
|
||||
doubleQuoteEnd :: Stream s m Char
|
||||
=> ParserT s st m ()
|
||||
|
|
6
test/command/4637.md
Normal file
6
test/command/4637.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
```
|
||||
% pandoc -t latex
|
||||
more \indextext{dogs}' than \indextext{cats}'
|
||||
^D
|
||||
more \indextext{dogs}' than \indextext{cats}'
|
||||
```
|
Loading…
Add table
Reference in a new issue