Further improvements in smart quotes.
Improves heuristic for detection of an "open double quote." Closes #2103.
This commit is contained in:
parent
80e2e88287
commit
d14c5f94df
2 changed files with 10 additions and 2 deletions
|
@ -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 ()
|
||||
|
|
8
test/command/2103.md
Normal file
8
test/command/2103.md
Normal file
|
@ -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!''
|
||||
```
|
Loading…
Reference in a new issue