Skip to content

Commit 195b957

Browse files
committed
Remove unused function _quarto.ast.walk_meta
1 parent adc7186 commit 195b957

File tree

2 files changed

+0
-43
lines changed

2 files changed

+0
-43
lines changed

src/resources/filters/ast/customnodes.lua

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -249,42 +249,6 @@ function create_emulated_node(t, tbl, context, forwarder)
249249
return result, custom_node_data[id]
250250
end
251251

252-
-- walk_meta walks a Pandoc Meta object, applying the filter to each node
253-
-- and recursing on lists and objects. It mutates the meta object in place
254-
-- and returns it.
255-
--
256-
-- It performs slightly more work than a regular walk filter because of the
257-
-- ambiguity around single-element lists and objects.
258-
function walk_meta(meta, filter)
259-
local skip = {
260-
["nil"] = true,
261-
number = true,
262-
boolean = true,
263-
string = true,
264-
["function"] = true,
265-
}
266-
local iterate = {
267-
Meta = true,
268-
List = true,
269-
}
270-
local function walk(obj)
271-
local t = type(obj)
272-
if skip[t] then
273-
return obj
274-
end
275-
local pt = quarto.utils.type(obj)
276-
if iterate[pt] then
277-
for k, v in pairs(obj) do
278-
obj[k] = walk(v)
279-
end
280-
else
281-
return _quarto.ast.walk(obj, filter)
282-
end
283-
return obj
284-
end
285-
return walk(meta)
286-
end
287-
288252
_quarto.ast = {
289253
vault = {
290254
_uuid = "3ade8a4a-fb1d-4a6c-8409-ac45482d5fc9",
@@ -541,8 +505,6 @@ _quarto.ast = {
541505

542506
walk = run_emulated_filter,
543507

544-
walk_meta = walk_meta,
545-
546508
writer_walk = function(doc, filter)
547509
local old_custom_walk = filter.Custom
548510
local function custom_walk(node)

src/resources/filters/normalize/extractquartodom.lua

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,6 @@ function parse_md_in_html_rawblocks()
4949
end
5050
return result
5151
end,
52-
-- Meta = function(meta)
53-
-- local filter = parse_md_in_html_rawblocks()
54-
-- local result = _quarto.ast.walk_meta(meta, filter)
55-
-- return result
56-
-- end,
5752
}
5853
end
5954

0 commit comments

Comments
 (0)