packages feed

citeproc 0.3 → 0.3.0.1

raw patch · 5 files changed

+69/−4 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,12 @@ # citeproc changelog +## 0.3.0.1++  * Better handle `initialize-with` that ends in a nonbreaking space.+    In this case, citeproc should not add an additional space+    or strip the nonbreaking space.  Closes #37.++ ## 0.3    * Change `makeReferenceMap` to return a cleaned-up list of
citeproc.cabal view
@@ -1,6 +1,6 @@ cabal-version:       2.2 name:                citeproc-version:             0.3+version:             0.3.0.1 synopsis:            Generates citations and bibliography from CSL styles. description:         citeproc parses CSL style files and uses them to                      generate a list of formatted citations and bibliography
man/citeproc.1 view
@@ -1,6 +1,6 @@ .\" Automatically generated by Pandoc 2.11.3 .\"-.TH "citeproc" "1" "" "citeproc 0.3" ""+.TH "citeproc" "1" "" "citeproc 0.3.0.1" "" .hy .SH NAME .PP
src/Citeproc/Eval.hs view
@@ -1999,8 +1999,9 @@            -> Text            -> Text initialize mblang makeInitials useHyphen initializeWith =-   T.strip . T.replace " -" "-" . mconcat . map initializeWord . splitWords+   stripSpaces . T.replace " -" "-" . mconcat . map initializeWord . splitWords   where+   stripSpaces = T.dropWhile (==' ') . T.dropWhileEnd (==' ') -- preserve nbsp    -- Left values are already initials    -- Right values are not    splitWords =@@ -2079,7 +2080,8 @@       NullOutput <+> x = x       Literal x <+> y =         case T.unsnoc (toText x) of-          Just (_, c) | c == '’' || c == '\'' || c == '-' || c == '\x2013' ->+          Just (_, c) | c == '’' || c == '\'' || c == '-' || c == '\x2013' ||+                        c == '\xa0' ->                formatted mempty [Literal x, y]           _ | isByzantineName name ->                formatted mempty{ formatDelimiter = Just " " } [Literal x, y]
+ test/extra/issue37.txt view
@@ -0,0 +1,56 @@+>>===== MODE =====>>+citation+<<===== MODE =====<<++>>===== RESULT =====>>+J. Doe+<<===== RESULT =====<<++>>===== CSL =====>>+<?xml version="1.0" encoding="utf-8"?>+<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0.1" name-form="long" initialize-with=".&#xa0;"> <!-- with a non-breakable space after the dot in initialize-with value -->+    <citation>+    <layout>+      <names variable="author">+        <name>+          <name-part name="given" form="short"/>+        </name>+      </names>+    </layout>+    </citation>+    <bibliography/>+</style>+<<===== CSL =====<<++>>==== CITATION-ITEMS ====>>+[+    [+        {+            "id": "doeA"+        }+    ]+]+<<==== CITATION-ITEMS ====<<+++>>===== INPUT =====>>+[+  {+    "author": [+      {+        "family": "Doe",+        "given": "John"+      }+    ],+    "id": "doeA",+    "title": "Fruits",+    "type": "book"+  }+]+<<===== INPUT =====<<+++>>===== VERSION =====>>+1.0+<<===== VERSION =====<<+