Skip to content

Commit

Permalink
lua - clean up comments
Browse files Browse the repository at this point in the history
  • Loading branch information
cscheid committed Apr 19, 2024
1 parent 6d7f03c commit a21d4c7
Showing 1 changed file with 0 additions and 85 deletions.
85 changes: 0 additions & 85 deletions src/resources/filters/layout/pandoc3_figure.lua
Original file line number Diff line number Diff line change
Expand Up @@ -148,91 +148,6 @@ function render_pandoc3_figure()
_quarto.ast.scoped_walk(doc.blocks, filter)
end
}

-- split local declaration because Lua's local is not
-- a letrec
-- local filter
-- filter = function(state)
-- state = state or {}
-- local function figure_renderer(figure, is_subfig)
-- -- this is a figure that is not cross-referenceable
-- -- if this ends up in a layout without fig-pos = H, it'll fail
-- -- 'H' forces it to not float
-- if figure.identifier == "" then
-- figure = _quarto.ast.walk(figure, {
-- Image = function(image)
-- image.attributes['fig-pos'] = 'H'
-- return image
-- end
-- })
-- end
-- local image
-- _quarto.ast.walk(figure, {
-- Image = function(img)
-- image = img
-- end
-- })
-- if image == nil then
-- return figure
-- end
-- if figure.caption.long ~= nil then
-- image.caption = quarto.utils.as_inlines(figure.caption.long)
-- end
-- for k, v in pairs(figure.attributes) do
-- image.attributes[k] = v
-- end
-- if is_subfig then
-- image.attributes['quarto-caption-env'] = 'subcaption'
-- end
-- image.classes:extend(figure.classes)
-- if state.in_column_margin then
-- image.classes:insert("column-margin")
-- end
-- return latexImageFigure(image)
-- end
-- local function float_renderer(float)
-- local count = 0
-- local new_content = _quarto.ast.walk(float.content, {
-- Figure = function(fig)
-- count = count + 1
-- return figure_renderer(fig, true), false
-- end
-- })
-- if count > 0 then
-- float.content = new_content
-- return float, false
-- end
-- end
-- return {
-- traverse = "topdown",
-- PanelLayout = function(panel)
-- panel.rows = _quarto.ast.walk(panel.rows, {
-- Figure = function(fig)
-- return figure_renderer(fig, true), false
-- end
-- })
-- return panel, false
-- end,
-- FloatRefTarget = float_renderer,
-- Div = function(div)
-- if div.classes:includes("column-margin") then
-- local new_state = {}
-- for k, v in pairs(state) do
-- new_state[k] = v
-- end
-- new_state.in_column_margin = true

-- div.content = _quarto.ast.walk(div.content, filter(new_state))
-- div.classes = div.classes:filter(function(x) return x ~= "column-margin" end)
-- return div
-- end
-- end,
-- Figure = function(figure)
-- return figure_renderer(figure, false)
-- end
-- }
-- end
-- return filter()
elseif _quarto.format.isTypstOutput() then
return {
traverse = "topdown",
Expand Down

0 comments on commit a21d4c7

Please sign in to comment.