summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mkiv/spac-ali.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/spac-ali.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/spac-ali.lua16
1 files changed, 6 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/spac-ali.lua b/Master/texmf-dist/tex/context/base/mkiv/spac-ali.lua
index 640478d3499..b58040ac72a 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/spac-ali.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/spac-ali.lua
@@ -38,7 +38,8 @@ local listcodes = nodes.listcodes
local hlist_code = nodecodes.hlist
local vlist_code = nodecodes.vlist
-local line_code = listcodes.line
+
+local linelist_code = listcodes.line
local new_stretch = nodepool.stretch
@@ -63,13 +64,12 @@ local nofrealigned = 0
-- raggedright 0 0 fil
-- raggedcenter 0 + 0 + -
-local function handler(head,leftpage,realpageno)
+local function handler(head,leftpage,realpageno) -- traverse_list
local current = head
- local done = false
while current do
local id = getid(current)
if id == hlist_code then
- if getsubtype(current) == line_code then
+ if getsubtype(current) == linelist_code then
local a = takeattr(current,a_realign)
if not a or a == 0 then
-- skip
@@ -102,7 +102,6 @@ local function handler(head,leftpage,realpageno)
elseif trace_realign then
report_realign("invalid flushing, align %a, page %a, realpage %a",align,pageno,realpageno)
end
- done = true
nofrealigned = nofrealigned + 1
end
end
@@ -113,14 +112,11 @@ local function handler(head,leftpage,realpageno)
end
current = getnext(current)
end
- return head, done
+ return head
end
function alignments.handler(head)
- local leftpage = isleftpage()
- local realpageno = texgetcount("realpageno")
- local head, done = handler(tonut(head),leftpage,realpageno)
- return tonode(head), done
+ return handler(head,isleftpage(),texgetcount("realpageno"))
end
local enabled = false