Hello community,

here is the log from the commit of package ghc-citeproc for openSUSE:Factory 
checked in at 2020-10-27 19:02:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-citeproc (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-citeproc.new.3463 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-citeproc"

Tue Oct 27 19:02:55 2020 rev:2 rq:844305 version:0.1.0.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-citeproc/ghc-citeproc.changes        
2020-10-23 15:13:11.870100958 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-citeproc.new.3463/ghc-citeproc.changes      
2020-10-27 19:03:11.774928831 +0100
@@ -1,0 +2,12 @@
+Fri Oct 23 19:25:24 UTC 2020 - psim...@suse.com
+
+- Update citeproc to version 0.1.0.3.
+  ## 0.1.0.3
+
+    * Better handling of author-only/suppress-author.
+      Previously all results of "names" elements were treated
+      as authors.  But only the first should be (generally this
+      is the author, but it could be the editor of an edited
+      volume with no author).  See jgm/pandoc#6765.
+
+-------------------------------------------------------------------

Old:
----
  citeproc-0.1.0.2.tar.gz

New:
----
  citeproc-0.1.0.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-citeproc.spec ++++++
--- /var/tmp/diff_new_pack.AdBTzY/_old  2020-10-27 19:03:12.410929294 +0100
+++ /var/tmp/diff_new_pack.AdBTzY/_new  2020-10-27 19:03:12.414929297 +0100
@@ -19,7 +19,7 @@
 %global pkg_name citeproc
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.1.0.2
+Version:        0.1.0.3
 Release:        0
 Summary:        Generates citations and bibliography from CSL styles
 License:        BSD-2-Clause

++++++ citeproc-0.1.0.2.tar.gz -> citeproc-0.1.0.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/citeproc-0.1.0.2/CHANGELOG.md 
new/citeproc-0.1.0.3/CHANGELOG.md
--- old/citeproc-0.1.0.2/CHANGELOG.md   2020-10-15 21:25:18.000000000 +0200
+++ new/citeproc-0.1.0.3/CHANGELOG.md   2020-10-23 06:40:34.000000000 +0200
@@ -1,5 +1,13 @@
 # citeproc changelog
 
+## 0.1.0.3
+
+  * Better handling of author-only/suppress-author.
+    Previously all results of "names" elements were treated
+    as authors.  But only the first should be (generally this
+    is the author, but it could be the editor of an edited
+    volume with no author).  See jgm/pandoc#6765.
+
 ## 0.1.0.2
 
   * Don't enclose contents of e:choose in a Formatted element (#19).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/citeproc-0.1.0.2/citeproc.cabal 
new/citeproc-0.1.0.3/citeproc.cabal
--- old/citeproc-0.1.0.2/citeproc.cabal 2020-10-15 21:23:22.000000000 +0200
+++ new/citeproc-0.1.0.3/citeproc.cabal 2020-10-23 06:40:20.000000000 +0200
@@ -1,6 +1,6 @@
 cabal-version:       2.2
 name:                citeproc
-version:             0.1.0.2
+version:             0.1.0.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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/citeproc-0.1.0.2/man/citeproc.1 
new/citeproc-0.1.0.3/man/citeproc.1
--- old/citeproc-0.1.0.2/man/citeproc.1 2020-10-15 21:25:27.000000000 +0200
+++ new/citeproc-0.1.0.3/man/citeproc.1 2020-10-23 06:42:15.000000000 +0200
@@ -1,6 +1,6 @@
-.\" Automatically generated by Pandoc 2.11.0.1
+.\" Automatically generated by Pandoc 2.11.0.2
 .\"
-.TH "citeproc" "1" "" "citeproc 0.1.0.2" ""
+.TH "citeproc" "1" "" "citeproc 0.1.0.3" ""
 .hy
 .SH NAME
 .PP
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/citeproc-0.1.0.2/src/Citeproc/Eval.hs 
new/citeproc-0.1.0.3/src/Citeproc/Eval.hs
--- old/citeproc-0.1.0.2/src/Citeproc/Eval.hs   2020-10-15 20:44:57.000000000 
+0200
+++ new/citeproc-0.1.0.3/src/Citeproc/Eval.hs   2020-10-22 07:59:42.000000000 
+0200
@@ -213,9 +213,14 @@
                        (layoutCollapse layoutOpts))
                       cs
 
+      let removeIfEqual x y
+           | x == y    = NullOutput
+           | otherwise = y
       let removeNamesIfSuppressAuthor
            (Tagged (TagItem SuppressAuthor cid') x)
-             = Tagged (TagItem SuppressAuthor cid') (transform removeNames x)
+             = let y = getAuthors x
+                in Tagged (TagItem SuppressAuthor cid')
+                     (transform (removeIfEqual y) x)
           removeNamesIfSuppressAuthor x = x
 
       -- we need to do this after disambiguation and collapsing
@@ -1011,7 +1016,7 @@
                                                   (citationItemId item)) x)
         . formatted mempty
         . (if citationItemType item == AuthorOnly
-              then filter isNames . concatMap universe
+              then map getAuthors
               else id)
         . (case citationItemPrefix item of
              Just t | isNote
@@ -1029,10 +1034,12 @@
         $ xs
 
 
-isNames :: Output a -> Bool
-isNames (Tagged TagNames{} _) = True
-isNames _ = False
-
+-- | The first-occurring element tagged as Names will be
+-- treated as the "author"; generally that is the author
+-- but it might be the editor if it's an edited volume.
+getAuthors :: Output a -> Output a
+getAuthors x =
+  headDef NullOutput [y | y@(Tagged TagNames{} _) <- universe x]
 
 removeNames :: Output a -> Output a
 removeNames (Tagged TagNames{} _) = NullOutput


Reply via email to