aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/abbreviations28
-rw-r--r--pandoc.cabal2
-rw-r--r--src/Text/Pandoc/App.hs8
3 files changed, 34 insertions, 4 deletions
diff --git a/data/abbreviations b/data/abbreviations
new file mode 100644
index 000000000..0d346226f
--- /dev/null
+++ b/data/abbreviations
@@ -0,0 +1,28 @@
+Mr.
+Mrs.
+Ms.
+Capt.
+Dr.
+Prof.
+Gen.
+Gov.
+e.g.
+i.e.
+Sgt.
+St.
+vol.
+vs.
+Sen.
+Rep.
+Pres.
+Hon.
+Rev.
+Ph.D.
+M.D.
+M.A.
+p.
+pp.
+ch.
+sec.
+cf.
+cp.
diff --git a/pandoc.cabal b/pandoc.cabal
index 8b895a015..56c2ddbc8 100644
--- a/pandoc.cabal
+++ b/pandoc.cabal
@@ -100,6 +100,8 @@ Data-Files:
data/LaTeXMathML.js
-- data for dzslides writer
data/dzslides/template.html
+ -- default abbreviations file
+ data/abbreviations
-- sample lua custom writer
data/sample.lua
-- bash completion template
diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs
index 9c2e076c5..34eadb6e0 100644
--- a/src/Text/Pandoc/App.hs
+++ b/src/Text/Pandoc/App.hs
@@ -280,10 +280,10 @@ convertWithOpts opts = do
uriFragment = "" }
_ -> Nothing
- abbrevs <- case optAbbreviations opts of
- Nothing -> return $ readerAbbreviations def
- Just f -> (Set.fromList . filter (not . null) . lines)
- <$> UTF8.readFile f
+ abbrevs <- (Set.fromList . filter (not . null) . lines) <$>
+ case optAbbreviations opts of
+ Nothing -> readDataFileUTF8 datadir "abbreviations"
+ Just f -> UTF8.readFile f
let readerOpts = def{ readerStandalone = standalone
, readerColumns = optColumns opts