packages feed

pandoc-citeproc 0.8.1 → 0.8.1.1

raw patch · 4 files changed

+19/−13 lines, 4 filesdep ~pandoc

Dependency ranges changed: pandoc

Files

changelog view
@@ -1,3 +1,8 @@+pandoc-citeproc (0.8.1.1)++  * Use pandoc's UTF8 versions of getContents, putStrLn, etc.+    Otherwise we get locale-dependent encodings.+ pandoc-citeproc (0.8.1)    * Improved performance in bibtex cross-reference resolution (#190).
man/man1/pandoc-citeproc.1 view
@@ -2,7 +2,7 @@ .\" Automatically generated by Pandoc 1.15.1.1 .\" .hy-.TH "pandoc\-citeproc" "1" "2015-11-12" "pandoc-citeproc 0.8.1" ""+.TH "pandoc\-citeproc" "1" "2015-11-14" "pandoc-citeproc 0.8.1.1" "" .SH NAME .PP pandoc\-citeproc \- filter to resolve citations in a pandoc document.
pandoc-citeproc.cabal view
@@ -1,5 +1,5 @@ name:               pandoc-citeproc-version:            0.8.1+version:            0.8.1.1 cabal-version:      >= 1.12 synopsis:           Supports using pandoc with citeproc @@ -141,7 +141,7 @@     ghc-prof-options: -fprof-auto-exported -rtsopts     build-depends:    base >= 4, pandoc-citeproc, pandoc-types >= 1.12.3, aeson,                       aeson-pretty, yaml, bytestring, syb, attoparsec, text,-                      filepath+                      pandoc, filepath     other-modules:    Paths_pandoc_citeproc                       Prelude     default-language: Haskell98
pandoc-citeproc.hs view
@@ -23,6 +23,7 @@ import Text.CSL.Pandoc (processCites') import Text.Pandoc.JSON hiding (Format) import Text.Pandoc.Walk+import qualified Text.Pandoc.UTF8 as UTF8  main :: IO () main = do@@ -30,13 +31,13 @@   let (flags, args, errs) = getOpt Permute options argv   let header = "Usage: pandoc-citeproc [options] [file..]"   unless (null errs) $ do-    hPutStrLn stderr $ usageInfo (unlines $ errs ++ [header]) options+    UTF8.hPutStrLn stderr $ usageInfo (unlines $ errs ++ [header]) options     exitWith $ ExitFailure 1   when (Version `elem` flags) $ do-    putStrLn $ "pandoc-citeproc " ++ showVersion version+    UTF8.putStrLn $ "pandoc-citeproc " ++ showVersion version     exitWith ExitSuccess   when (Help `elem` flags) $ do-    putStrLn $ usageInfo header options+    UTF8.putStrLn $ usageInfo header options     exitWith ExitSuccess   if Bib2YAML `elem` flags || Bib2JSON `elem` flags      then do@@ -47,12 +48,12 @@                          msum (map formatFromExtension args) of                          Just f   -> return f                          Nothing  -> do-                            hPutStrLn stderr $ usageInfo+                            UTF8.hPutStrLn stderr $ usageInfo                               ("Unknown format\n" ++ header) options                             exitWith $ ExitFailure 3        bibstring <- case args of-                         []    -> getContents-                         xs    -> mconcat <$> mapM readFile xs+                         []    -> UTF8.getContents+                         xs    -> mconcat <$> mapM UTF8.readFile xs        readBiblioString bibformat bibstring >>=          warnDuplicateKeys >>=          if Bib2YAML `elem` flags@@ -91,7 +92,7 @@ doCites doc = do   doc' <- processCites' doc   let warnings = query findWarnings doc'-  mapM_ (hPutStrLn stderr) warnings+  mapM_ (UTF8.hPutStrLn stderr) warnings   return doc'  findWarnings :: Inline -> [String]@@ -116,15 +117,15 @@  warnDuplicateKeys :: [Reference] -> IO [Reference] warnDuplicateKeys refs = mapM_ warnDup dupKeys >> return refs-  where warnDup k = hPutStrLn stderr $ "biblio2yaml: duplicate key " ++ k+  where warnDup k = UTF8.hPutStrLn stderr $ "biblio2yaml: duplicate key " ++ k         allKeys   = map (unLiteral . refId) refs         dupKeys   = [x | (x:_:_) <- group (sort allKeys)]  outputYamlBlock :: B.ByteString -> IO () outputYamlBlock contents = do-  putStrLn "---\nreferences:"+  UTF8.putStrLn "---\nreferences:"   B.putStr contents-  putStrLn "..."+  UTF8.putStrLn "..."  -- turn -- id: ! "\u043F\u0443\u043D\u043A\u04423"