Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions src/resources/filters/ast/customnodes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -249,42 +249,6 @@ function create_emulated_node(t, tbl, context, forwarder)
return result, custom_node_data[id]
end

-- walk_meta walks a Pandoc Meta object, applying the filter to each node
-- and recursing on lists and objects. It mutates the meta object in place
-- and returns it.
--
-- It performs slightly more work than a regular walk filter because of the
-- ambiguity around single-element lists and objects.
function walk_meta(meta, filter)
local skip = {
["nil"] = true,
number = true,
boolean = true,
string = true,
["function"] = true,
}
local iterate = {
Meta = true,
List = true,
}
local function walk(obj)
local t = type(obj)
if skip[t] then
return obj
end
local pt = quarto.utils.type(obj)
if iterate[pt] then
for k, v in pairs(obj) do
obj[k] = walk(v)
end
else
return _quarto.ast.walk(obj, filter)
end
return obj
end
return walk(meta)
end

_quarto.ast = {
vault = {
_uuid = "3ade8a4a-fb1d-4a6c-8409-ac45482d5fc9",
Expand Down Expand Up @@ -541,8 +505,6 @@ _quarto.ast = {

walk = run_emulated_filter,

walk_meta = walk_meta,

writer_walk = function(doc, filter)
local old_custom_walk = filter.Custom
local function custom_walk(node)
Expand Down
5 changes: 0 additions & 5 deletions src/resources/filters/normalize/extractquartodom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ function parse_md_in_html_rawblocks()
end
return result
end,
-- Meta = function(meta)
-- local filter = parse_md_in_html_rawblocks()
-- local result = _quarto.ast.walk_meta(meta, filter)
-- return result
-- end,
}
end

Expand Down
Loading