Изменения

thead, tbody, tfoot
Строка 133: Строка 133:  
end
 
end
 
end
 
end
 +
 +
-- These tags should be removed and their contents moved to the parent tag:
 +
local tear = to_set { 'thead', 'tbody', 'tfoot' }
    
-- If there is only one child node, and it can be safely assimilated into the parent node:
 
-- If there is only one child node, and it can be safely assimilated into the parent node:
Строка 139: Строка 142:  
return node
 
return node
 
end
 
end
local child = clone (node [1])
+
local child = node [1]
 
if not child or type (child) == 'string' or table_set [child.__name] then
 
if not child or type (child) == 'string' or table_set [child.__name] then
 
return node
 
return node
 
end
 
end
if node.__name == child.__name or child.__name == 'span' then
+
child = clone (child)
 +
if node.__name == child.__name or child.__name == 'span' or tear [child.__name] then
 
child = assimilate (child)
 
child = assimilate (child)
 
for key, value in pairs (child) do
 
for key, value in pairs (child) do