packages feed

citeproc 0.8.1.2 → 0.8.1.3

raw patch · 5 files changed

+74/−3 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,11 @@ # citeproc changelog +## 0.8.1.3++ * Don't add SubstitutedVal to variables that were empty (#148).+   This fixes a bug which caused `variable=` tests to succeed+   in some cases where they should have failed.+ ## 0.8.1.2    * Allow containers 0.7 (#143)
citeproc.cabal view
@@ -1,6 +1,6 @@ cabal-version:       2.2 name:                citeproc-version:             0.8.1.2+version:             0.8.1.3 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
src/Citeproc/Eval.hs view
@@ -1643,7 +1643,7 @@                  Just (NumVal x) -> return $ Literal                                            $ fromText (T.pack (show x))                  _ -> return NullOutput-        deleteSubstitutedVariables [v]+        unless (isNothing mbv) $ deleteSubstitutedVariables [v]         if v == "title" && res /= NullOutput             then do               modify (\st -> st { stateUsedTitle = True })
stack.yaml view
@@ -2,7 +2,7 @@   citeproc:     executable: true     icu: false-resolver: lts-19.0+resolver: lts-23.0 extra-deps: - Diff-1.0.2 ghc-options:
+ test/extra/issue_148.txt view
@@ -0,0 +1,65 @@+>>===== MODE =====>>+citation+<<===== MODE =====<<+++++>>===== RESULT =====>>+Variable not present+<<===== RESULT =====<<+++>>===== CSL =====>>+<?xml version="1.0" encoding="utf-8"?>+<style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0">+  <info>+    <title>Subtitution test</title>+    <id>http://www.zotero.org/styles/substitution-test</id>+    <updated>2025-02-02T12:27:40+00:00</updated>+  </info>+  <macro name="contributors-note">+    <names>+      <substitute>+        <text variable="editor"/>+      </substitute>+    </names>+  </macro>+  <citation>+    <layout>+      <text macro="contributors-note"/>+      <choose>+        <if variable="editor">+          <text value="Variable present"/>+        </if>+        <else-if match="none" variable="editor">+          <text value="Variable not present"/>+        </else-if>+      </choose>+    </layout>+  </citation>+</style>+<<===== CSL =====<<+++>>===== CITATION-ITEMS =====>>+[ [ {"id":"test"} ] ]+<<===== CITATION-ITEMS =====<<++++>>===== INPUT =====>>+[+  {+    "id": "test",+    "type": "book",+    "title": "Title"+  }+]+<<===== INPUT =====<<+++>>===== VERSION =====>>+1.0+<<===== VERSION =====<<+