...
 
Commits (4)
......@@ -11,6 +11,10 @@ where version numbers starting with version 1.0.0 adhere to
** [Unreleased]
** [2.15.1] - 2020-06-23
*** Fixed
- Split years separated by commas in copyright years
** [2.15.0] - 2020-06-11
*** Added
- Variable [[file:oer-reveal.el::(defcustom oer-reveal-warning-delay t][oer-reveal-warning-delay]]
......
......@@ -276,7 +276,8 @@ variable, and communication channel under `info'."
(ert-deftest test-spdx-license-info ()
"Tests for RDFa license information from SPDX headers."
(let ((oer-reveal-copy-dir-suffix ""))
(let ((oer-reveal-copy-dir-suffix "")
(oer-reveal-warning-delay nil))
;; Header with URL and single license.
(let ((header "#+TITLE: A test\n#+SPDX-FileCopyrightText: 2019 Jens Lechtenbörger <https://lechten.gitlab.io/#me>\n#+SPDX-License-Identifier: CC-BY-SA-4.0\n")
......@@ -535,11 +536,15 @@ variable, and communication channel under `info'."
(jl-part "2020 Jens Lechtenbörger")
(jl-old "2000 Jens Lechtenbörger")
(jl-range "2017-2019 Jens Lechtenbörger <https://lechten.gitlab.io/#me>")
(jl-split "2017-2018, 2020 Jens Lechtenbörger <https://lechten.gitlab.io/#me>")
(alice "2019 Alice <https://example.org/#alice>")
(bob "2017-2019 Bob <https://example.org/#bob>"))
(should
(equal (oer-reveal--convert-creators (list jl-single) 'html " and ")
"<span property=\"dc:rights\">© <span property=\"dcterms:dateCopyrighted\">2020</span> <a rel=\"cc:attributionURL dcterms:creator\" href=\"https://lechten.gitlab.io/#me\" property=\"cc:attributionName\">Jens Lechtenbörger</a></span>"))
(should
(equal (oer-reveal--convert-creators (list jl-split) 'html " and ")
"<span property=\"dc:rights\">© <span property=\"dcterms:dateCopyrighted\">2017-2018, 2020</span> <a rel=\"cc:attributionURL dcterms:creator\" href=\"https://lechten.gitlab.io/#me\" property=\"cc:attributionName\">Jens Lechtenbörger</a></span>"))
(should
(equal (oer-reveal--convert-creators
(list jl-single jl-part) 'html " and ")
......
......@@ -7,7 +7,7 @@
;; Author: Jens Lechtenbörger
;; URL: https://gitlab.com/oer/oer-reveal
;; Version: 2.15.0
;; Version: 2.15.1
;; Package-Requires: ((emacs "24.4") (org-re-reveal "2.12.0"))
;; Keywords: hypermedia, tools, slideshow, presentation, OER
......@@ -1543,7 +1543,9 @@ of a list of years and a URI (or nil)."
(uri (match-string 4 line))
;; On Emacs 24, string-trim destroys match data;
;; thus trim after final match-string.
(years (string-trim years))
(years (split-string
(string-trim years)
"," t " "))
(name (string-trim name))
;; URI may be an e-mail address, which would be useless.
(isurl (and uri (oer-reveal-http-url-p uri)))
......@@ -1557,10 +1559,10 @@ of a list of years and a URI (or nil)."
"Different URIs (%s vs %s) for %s. Unify SPDX headers?"
uri iuri name))
(puthash name
(cons (cons years iyears) iuri)
(cons (append years iyears) iuri)
result))
(puthash name
(cons (list years) (and isurl (string-trim uri)))
(cons years (and isurl (string-trim uri)))
result))))))
(defun oer-reveal--convert-license (value fmt language)
......