module GitHub::Markup

def command(command, regexp, &block)

def command(command, regexp, &block)
  command = command.to_s
  if File.exists?(file = File.dirname(__FILE__) + "/commands/#{command}")
    command = file
  end
  add_markup(regexp) do |content|
    rendered = execute(command, content)
    rendered = rendered.to_s.empty? ? content : rendered
    block ? block.call(rendered) : rendered
  end
end