summaryrefslogtreecommitdiff
path: root/tex/context/base/spac-ver.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/spac-ver.lua')
-rw-r--r--tex/context/base/spac-ver.lua19
1 files changed, 16 insertions, 3 deletions
diff --git a/tex/context/base/spac-ver.lua b/tex/context/base/spac-ver.lua
index 018881663..55c135cf6 100644
--- a/tex/context/base/spac-ver.lua
+++ b/tex/context/base/spac-ver.lua
@@ -879,6 +879,8 @@ local special_penalty_xxx = 0
-- header don't break but also make sure that we have at least a decent
-- break when we have succesive ones (often when testing)
+-- todo: mark headers as such so that we can recognize them
+
local specialmethods = { }
local specialmethod = 1
@@ -927,10 +929,21 @@ specialmethods[1] = function(start,penalty)
return
end
elseif trace_specials then
- report_specials(" context %a, higher level, continue",p)
+ report_specials(" context penalty %a, higher level, continue",p)
+ end
+ else
+ local p = getfield(current,"penalty")
+ if p < 10000 then
+ -- assume some other mechanism kicks in so we seem to have content
+ if trace_specials then
+ report_specials(" regular penalty %a, quitting",p)
+ end
+ break
+ else
+ if trace_specials then
+ report_specials(" regular penalty %a, continue",p)
+ end
end
- elseif trace_specials then
- report_specials(" regular penalty, continue")
end
end
current = getprev(current)