summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/metadata_filter.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/metadata_filter.lua b/scripts/metadata_filter.lua
index 5fa7dfc..c154708 100644
--- a/scripts/metadata_filter.lua
+++ b/scripts/metadata_filter.lua
@@ -196,8 +196,6 @@ end
196function generate_list(meta) 196function generate_list(meta)
197 if not meta.pages then return nil end 197 if not meta.pages then return nil end
198 198
199 local limit = (meta.list_limit and tonumber(pandoc.utils.stringify(meta.list_limit))) or 9999
200
201 if meta.depth == "1" then 199 if meta.depth == "1" then
202 return meta.pages.all:map(function(p) 200 return meta.pages.all:map(function(p)
203 return { 201 return {
@@ -212,6 +210,7 @@ function generate_list(meta)
212 end) 210 end)
213 elseif meta.depth == "2" then 211 elseif meta.depth == "2" then
214 return meta.pages.all:map(function(cat) 212 return meta.pages.all:map(function(cat)
213 local limit = (cat.list_limit and tonumber(pandoc.utils.stringify(cat.list_limit))) or 9999
215 local allItems = ((cat.pages and cat.pages.all) or pandoc.List()):map(function(p) 214 local allItems = ((cat.pages and cat.pages.all) or pandoc.List()):map(function(p)
216 return { 215 return {
217 title = p.title, 216 title = p.title,
@@ -238,6 +237,7 @@ function generate_list(meta)
238 end):filter(function(cat) return #cat.items ~= 0 end) 237 end):filter(function(cat) return #cat.items ~= 0 end)
239 elseif meta.depth == "3" then 238 elseif meta.depth == "3" then
240 return meta.pages.all:map(function(cat) 239 return meta.pages.all:map(function(cat)
240 local limit = (cat.list_limit and tonumber(pandoc.utils.stringify(cat.list_limit))) or 9999
241 local allItems = (cat.pages and cat.pages.all or pandoc.List()):flatMap(function(c) 241 local allItems = (cat.pages and cat.pages.all or pandoc.List()):flatMap(function(c)
242 if c.pages then 242 if c.pages then
243 return c.pages.all:map(function(p) 243 return c.pages.all:map(function(p)