Skip to content

Commit

Permalink
Merge pull request #439 from daniron26/patch-1
Browse files Browse the repository at this point in the history
fix year extraction from date in bibtex-completion-apa-get-value
  • Loading branch information
tmalsburg authored Sep 18, 2023
2 parents ef07adf + f410356 commit 9555174
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bibtex-completion.el
Original file line number Diff line number Diff line change
Expand Up @@ -1219,9 +1219,11 @@ string if FIELD is not present in ENTRY and DEFAULT is nil."
;; the journal in its title.
("pages" (s-join "" (s-split "[^0-9]+" value t)))
("doi" (s-concat " http://dx.doi.org/" value))
("year" (or value
(car (split-string (bibtex-completion-get-value "date" entry "") "-"))))
(_ value))))))
("year" value)
(_ value))
(pcase field
("year" (car (split-string (bibtex-completion-get-value "date" entry "") "-"))))
))))
default ""))

(defun bibtex-completion-apa-format-authors (value &optional abbrev)
Expand Down

0 comments on commit 9555174

Please sign in to comment.