Skip to content

Commit

Permalink
Merge pull request andras-simonyi#123 from andras-simonyi/Allow_forma…
Browse files Browse the repository at this point in the history
…tting_in_locators

Allow formatting in locators
  • Loading branch information
andras-simonyi authored Oct 25, 2022
2 parents 678db83 + a20411a commit e705911
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion citeproc-context.el
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ optional FORM can be nil, `short' or `long'."
(sep (or (citeproc-term-text-from-terms "page-range-delimiter"
(citeproc-context-terms context))
"")))
(citeproc-prange-render var-val prange-format sep))
(citeproc-rt-from-str (citeproc-prange-render var-val prange-format sep)))
var-val)))))

(defun citeproc-locator-label (context)
Expand Down
2 changes: 1 addition & 1 deletion citeproc-name.el
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ contents."
(defun citeproc--var-plural-p (var context)
"Return whether the content of variable VAR is plural.
VAR is a symbol."
(let ((content (citeproc-var-value var context)))
(let ((content (citeproc-rt-to-plain (citeproc-var-value var context))))
(if (or (string= var "number-of-pages")
(string= var "number-of-volumes"))
(> (string-to-number content) 1)
Expand Down
3 changes: 2 additions & 1 deletion citeproc-rt.el
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,8 @@ on any dominated branch for which PRED holds."
((sc . nil) . (font-variant . "small-caps"))
((sup . nil) . (vertical-align . "sup"))
((sub . nil) . (vertical-align . "sub"))
((span . ((class . "nocase"))) . (nocase . t)))
((span . ((class . "nocase"))) . (nocase . t))
((span . ((class . "underline"))) . (text-decoration . "underline")))
"A mapping from html tags and attrs to rich text attrs.")

(defun citeproc-rt-from-html (h)
Expand Down

0 comments on commit e705911

Please sign in to comment.