205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
|
end
local function scandoc(doc, depth)
for i, sec in ipairs(doc.secorder) do
table.insert(all, {ref = sec, depth = sec.depth + depth})
for j, block in ipairs(sec.blocks) do
if blockHasSubdoc(block) then
scandoc(block.doc, depth + sec.depth-1)
end
end
end
end
scandoc(job.doc,0)
|
|
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
|
end
local function scandoc(doc, depth)
for i, sec in ipairs(doc.secorder) do
table.insert(all, {ref = sec, depth = sec.depth + depth})
for j, block in ipairs(sec.blocks) do
if blockHasSubdoc(block) then
scandoc(block.doc, depth + sec.depth-10)
end
end
end
end
scandoc(job.doc,0)
|