Skip to content

Commit

Permalink
use a more robust way to get a string from an Inlines
Browse files Browse the repository at this point in the history
  • Loading branch information
cscheid committed Nov 17, 2023
1 parent 3529a5e commit 3a6d542
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/resources/filters/crossref/index.lua
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,7 @@ end

local function index_caption(v)
if #v.caption > 0 then
if pandoc.utils.type(v.caption[1]) == "Inline" then
return inlinesToString(pandoc.Inlines({v.caption[1]}))
else
return inlinesToString(pandoc.Inlines(v.caption[1].content))
end
return inlinesToString(quarto.utils.as_inlines(v.caption))
else
return ""
end
Expand Down

0 comments on commit 3a6d542

Please sign in to comment.