class Object

Public Instance Methods

check_blockquote(errors, elements) click to toggle source
# File lib/mdl/rules.rb, line 418
def check_blockquote(errors, elements)
  prev = [nil, nil, nil]
  elements.each do |e|
    prev.shift
    prev << e.type
    if prev == [:blockquote, :blank, :blockquote]
      # The current location is the start of the second blockquote, so the
      # line before will be a blank line in between the two, or at least the
      # lowest blank line if there are more than one.
      errors << e.options[:location] - 1
    end
    check_blockquote(errors, e.children)
  end
end