diff options
author | John MacFarlane <jgm@berkeley.edu> | 2010-11-04 09:11:15 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2010-11-04 09:11:15 -0700 |
commit | 5871c4d51f0614ca82c12f6289f8241dfa209e4f (patch) | |
tree | 91e5f2fc749e02009b3b5637dbb42c1eff836eaa /src/Text | |
parent | 5e1dc6adda5b11a1d5e51dcccae4801f60b64f4b (diff) | |
download | pandoc-5871c4d51f0614ca82c12f6289f8241dfa209e4f.tar.gz |
Biblio: small fix to detection of punctuation (A. Rossato).
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Biblio.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Biblio.hs b/src/Text/Pandoc/Biblio.hs index 8a9b21b4e..16215505e 100644 --- a/src/Text/Pandoc/Biblio.hs +++ b/src/Text/Pandoc/Biblio.hs @@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA module Text.Pandoc.Biblio ( processBiblio ) where import Control.Monad ( when ) -import Data.Char ( toUpper, isPunctuation ) +import Data.Char ( toUpper ) import Data.List import Data.Unique import Text.CSL hiding ( Cite(..), Citation(..) ) @@ -129,12 +129,12 @@ mvCiteInNote is = procInlines mvCite checkPt i | Cite c o : xs <- i - , headInline xs == lastInline o + , endWPt o, startWPt xs , endWPt o = Cite c (initInline o) : checkPt xs | x:xs <- i = x : checkPt xs | otherwise = [] - endWPt = and . map isPunctuation . lastInline - startWPt = and . map isPunctuation . headInline + endWPt = and . map (`elem` ".,;:!?") . lastInline + startWPt = and . map (`elem` ".,;:!?") . headInline checkNt = processWith $ procInlines checkPt headInline :: [Inline] -> String |