git.iko.soy/typeable/pandoc
on master help sign in
Revert "Relax `--abbreviations` rules so that a period isn't required."

This reverts commit e461b7dd45f717f3317216c7d3207a1d24bf1c85. Ill-advised change. This doesn't work because we parse strings in chunks.

commit916ce4d51121e0529b938fda71f37e947882abe5 authorJohn MacFarlane <jgm@berkeley.edu> dateThu 4 Mar 2021, 16:22 (6 years ago) parente461b7d
2 files changed+4−4
MANUAL.txt+3−3 src/Text/Pandoc/Readers/Markdown.hs+1−1
MANUAL.txt+3−3
@@ -691,9 +691,9 @@ header when requesting a document from a URL:
691691 system default, use
692692 `pandoc --print-default-data-file=abbreviations`. The only
693693 use pandoc makes of this list is in the Markdown reader.
694− Strings found in this list will be followed by a nonbreaking
695− space, and the period will not produce sentence-ending space
696− in formats like LaTeX. The strings may not contain spaces.
694+ Strings ending in a period that are found in this list will
695+ be followed by a nonbreaking space, so that the period will
696+ not produce sentence-ending space in formats like LaTeX.
697697
698698[`pandocfilters`]: https://github.com/jgm/pandocfilters
699699[PHP]: https://github.com/vinai/pandocfilters-php
src/Text/Pandoc/Readers/Markdown.hs+1−1
@@ -1725,7 +1725,7 @@ str = do
17251725 updateLastStrPos
17261726 (do guardEnabled Ext_smart
17271727 abbrevs <- getOption readerAbbreviations
1728− if result `Set.member` abbrevs
1728+ if not (T.null result) && T.last result == '.' && result `Set.member` abbrevs
17291729 then try (do ils <- whitespace
17301730 notFollowedBy (() <$ cite <|> () <$ note)
17311731 -- ?? lookAhead alphaNum