class Rouge::Lexers::XML

Public Class Methods

detect?(text) click to toggle source
# File lib/rouge/lexers/xml.rb, line 18
def self.detect?(text)
  return false if text.doctype?(/html/)
  return true if text =~ /\A<\?xml\b/
  return true if text.doctype?
end