Skip to content

Commit

Permalink
fix(packages): Correct error handling the locator on some CSL styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Omikhleia authored and alerque committed Feb 20, 2025
1 parent d8386ab commit 21b751e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/bibtex/csl/engine.lua
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,8 @@ function CslEngine:_text (options, content, entry)
t = entry[variable]
self:_addGroupVariable(variable, t)
if variable == "locator" then
variable = t and t.label
t = t and t.value
variable = entry.locator.label
end
if variable == "page" and t then
-- Replace any dash in page ranges
Expand Down Expand Up @@ -732,6 +732,7 @@ function CslEngine:_number (options, content, entry)
local value = entry[variable]
self:_addGroupVariable(variable, value)
if variable == "locator" then -- special case
variable = value and value.label
value = value and value.value
end
if value then
Expand Down

0 comments on commit 21b751e

Please sign in to comment.