aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Citeproc/BibTeX.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2020-11-21 12:06:01 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2020-11-21 12:07:28 -0800
commitfec8223d3a6979f675513300b2211c6235b8bccd (patch)
tree716ce4518e5955af3a13d0d3594d6fd2d09c27a9 /src/Text/Pandoc/Citeproc/BibTeX.hs
parent56ceaf49dc1627ed05febcccae9899a68b3da99f (diff)
downloadpandoc-fec8223d3a6979f675513300b2211c6235b8bccd.tar.gz
Citeproc BibTeX parser: revert change in getRawField...
which was made (for reasons forgotten) when transferring this code from pandoc-citeproc. The change led to `--` in URLs being interpreted as en-dashes, which is unwanted. Closes #6874.
Diffstat (limited to 'src/Text/Pandoc/Citeproc/BibTeX.hs')
-rw-r--r--src/Text/Pandoc/Citeproc/BibTeX.hs11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Citeproc/BibTeX.hs b/src/Text/Pandoc/Citeproc/BibTeX.hs
index b24ad0319..552339df0 100644
--- a/src/Text/Pandoc/Citeproc/BibTeX.hs
+++ b/src/Text/Pandoc/Citeproc/BibTeX.hs
@@ -822,12 +822,11 @@ getOldDate prefix = do
, dateLiteral = literal }
getRawField :: Text -> Bib Text
-getRawField f =
- (stringify <$> getField f)
- <|> do fs <- asks fields
- case Map.lookup f fs of
- Just x -> return x
- Nothing -> notFound f
+getRawField f = do
+ fs <- asks fields
+ case Map.lookup f fs of
+ Just x -> return x
+ Nothing -> notFound f
getLiteralList :: Text -> Bib [Inlines]
getLiteralList f = do