From 23207344301bd7f9c63190d2c39bd0352b4b1d8a Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sun, 21 Nov 2021 09:40:35 +0100 Subject: Clwanup --- scripts/metadata_filter.lua | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'scripts/metadata_filter.lua') diff --git a/scripts/metadata_filter.lua b/scripts/metadata_filter.lua index 9125696..26d2423 100644 --- a/scripts/metadata_filter.lua +++ b/scripts/metadata_filter.lua @@ -108,14 +108,14 @@ function prep_menu(active_id, main_menu) return { items = items, active = active_item } end -function process_pages(global, parent, order, pages_by_id) +function process_pages(global, order, pages_by_id) if not pages_by_id then return nil end local pages_all = pandoc.List() local pages_date_desc = pandoc.List() for _, page in pairs(pages_by_id) do - local p = process(global, parent, page) + local p = process(global, page) if not p.unlisted then pages_all:insert(p) if p.date then pages_date_desc:insert(p) end @@ -284,7 +284,7 @@ function generate_list(meta) end end -function process(global, parent, meta) +function process(global, meta) meta.namespace = resolve_namespace(meta.namespace) meta.file_out = pandoc.utils.stringify(meta.file_out):gsub("^out", "") meta.redirect = meta.url and true @@ -318,8 +318,7 @@ function process(global, parent, meta) meta.menus.main = prep_menu(meta.namespace.root.id, meta.menus.main) end - meta.pages = - process_pages(global, { parent = parent, meta = meta }, meta.list_order, meta.pages) + meta.pages = process_pages(global, meta.list_order, meta.pages) meta.depth = (meta.pages and find_depth(meta.pages.all)) or "0" meta.layout = prep_layout(meta.layout or (meta.redirect and "redirect") or resolve_layout(meta.depth)) @@ -346,5 +345,5 @@ end function Meta(meta) meta.site.url = pandoc.utils.stringify(meta.site.url):gsub("/$", "") - return process(meta, nil, meta) + return process(meta, meta) end -- cgit v1.2.3-54-g00ecf