Skip to content

Commit

Permalink
only handle labels that are valid as table labels
Browse files Browse the repository at this point in the history
  • Loading branch information
cscheid committed Oct 16, 2023
1 parent cfebb28 commit 180a593
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/resources/filters/quarto-pre/parsefiguredivs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,13 @@ function parse_reftargets()
end
end

-- knitr can emit a label that starts with "tab:"
-- we don't handle those as floats
local ref = refType(label_identifier)
if ref == nil then
return nil
end

local caption
local b, e, match3, caption_content = raw.text:find(patterns.latex_caption)
if b ~= nil then
Expand Down

0 comments on commit 180a593

Please sign in to comment.