# File lib/maruku/attributes.rb, line 91
    def merge_ial(elements, src, con)
      # Apply each IAL to the element before
      (elements + [nil]).each_cons(3) do |before, e, after|
        next unless ial?(e)

        if before.kind_of? MDElement
          before.al = e.ial
        elsif after.kind_of? MDElement
          after.al = e.ial
        else
          maruku_error "It's unclear which element the attribute list {:\#{e.ial.to_s}}\nis referring to. The element before is a \#{before.class},\nthe element after is a \#{after.class}.\n  before: \#{before.inspect}\n  after: \#{after.inspect}\n", src, con
        end
      end

      unless Globals[:debug_keep_ials]
        elements.delete_if {|x| ial?(x) && x != elements.first}
      end
    end