class Danger::Markdown

def <=>(other)

def <=>(other)
  return 1 if other.type != :markdown
  compare_by_file_and_line(other)
end

def ==(other)

def ==(other)
  return false if other.nil?
  return false unless other.kind_of? self.class
  other.message == message &&
    other.file == file &&
    other.line == line
end

def hash

def hash
  h = 1
  h = h * 31 + message.hash
  h = h * 17 + file.hash
  h * 17 + line.hash
end

def initialize(message, file = nil, line = nil)

def initialize(message, file = nil, line = nil)
  super(type: :markdown, message: message, file: file, line: line)
end

def to_s

def to_s
  extra = []
  extra << "file: #{file}" unless file
  extra << "line: #{line}" unless line
  "Markdown #{message} { #{extra.join ', '} }"
end