Smart punctuation: don't alllow ellipses containing spaces.
Previously we allowed '. . .', ' . . . ', etc. This caused
too many complications, and removed author's flexibility in
combining ellipses with spaces and periods.
commitace3b80f1eba86d4819bb21643271b6152d9f59b
authorJohn MacFarlane <jgm@berkeley.edu>
dateTue 7 Dec 2010, 20:08 (16 years ago)
parent50ca61e
src/Text/Pandoc/Parsing.hs+1−1
@@ -755,7 +755,7 @@ doubleQuoteEnd :: GenParser Char st ()
755755doubleQuoteEnd = oneOf "\"\8221" >> return ()
756756
757757ellipses :: GenParser Char st Inline
758−ellipses = oneOfStrings ["...", " . . . ", ". . .", " . . ."] >> return Ellipses
758+ellipses = try $ string "..." >> return Ellipses
759759
760760dash :: GenParser Char st Inline
761761dash = enDash <|> emDash
tests/testsuite.txt+1−1
@@ -496,7 +496,7 @@ Some dashes: one---two --- three--four -- five.
496496
497497Dashes between numbers: 5-7, 255-66, 1987-1999.
498498
499−Ellipses...and. . .and . . . .
499+Ellipses...and...and....
500500
501501-----
502502