summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2021-03-05 19:19:41 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2021-03-05 19:19:41 +0100
commitfa586e6ec838cce74b4ac10fb4c68241061b5f23 (patch)
tree14ba9c6bd7530aa5777d8232beb12939f085da8c /scripts
parentcd05787a9d41bac345695564011d333974afe1d9 (diff)
downloadcontext-fa586e6ec838cce74b4ac10fb4c68241061b5f23.tar.gz
2021-03-05 19:13:00
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/lua/mtx-context.lua20
1 files changed, 16 insertions, 4 deletions
diff --git a/scripts/context/lua/mtx-context.lua b/scripts/context/lua/mtx-context.lua
index 5b159158c..7ae350111 100644
--- a/scripts/context/lua/mtx-context.lua
+++ b/scripts/context/lua/mtx-context.lua
@@ -1452,20 +1452,29 @@ function scripts.context.pages()
end
if page or list then
if page then
+ for i=1,#page do
+ page[i] = string.topattern(page[i])
+ end
for i=1,#p do
local pi = p[i]
local m = pi.marked
if m then
+ local ml = #m
for j=1,#page do
local n = page[j]
- if table.contains(m,n) then
- report("page : %04i %s",i,n)
+ for k=1,ml do
+ if find(m[k],n) then
+ report("page : %04i %s",i,m[k])
+ end
end
end
end
end
end
if list then
+ for i=1,#list do
+ list[i] = string.topattern(list[i])
+ end
for i=1,#l do
local li = l[i]
local r = li.references
@@ -1473,10 +1482,13 @@ function scripts.context.pages()
local rr = r.reference
if rr then
rr = splitstring(rr,",")
+ local rrl = #rr
for j=1,#list do
local n = list[j]
- if table.contains(rr,n) then
- report("list : %04i %s",r.realpage,n)
+ for k=1,rrl do
+ if find(rr[k],n) then
+ report("list : %04i %s",r.realpage,rr[k])
+ end
end
end
end