def update_tree(element)
last_blank = nil
element.children.map! do |child|
if child.type == :raw_text
last_blank = nil
reset_env(:src => StringScanner.new(child.value), :text_type => :text)
parse_spans(child)
child.children
elsif child.type == :eob
[]
elsif child.type == :blank
if last_blank
last_blank.value << child.value
[]
else
last_blank = child
child
end
else
last_blank = nil
update_tree(child)
update_attr_with_ial(child.attr, child.options[:ial]) if child.options[:ial]
child
end
end.flatten!
end