do
slow_find_char_class = function (c, m, oc)
local cls = ltjf_find_char_class(oc, m)
- if not c and cls==0 then
+ if cls==0 then
return ltjf_find_char_class(-c, m), oc
else
return cls, oc
local function handle_penalty_always(post, pre, g)
local a = (pre or 0) + (post or 0)
if #Bp == 0 then
- if not (g and getid(g)==id_glue) then
+ if not (g and getid(g)==id_glue) or a~=0 then
local p = node_new(id_penalty)
if a<-10000 then a = -10000 elseif a>10000 then a = 10000 end
setfield(p, 'penalty', a)