RegexLexer
TODO: is this too much of a performance hit? JSON is quite simple, so I’d think this wouldn’t be too bad, but for large documents this could mean doing two full lexes.
# File lib/rouge/lexers/javascript.rb, line 172 def self.analyze_text(text) return 0.8 if text =~ /\A\s*{/ && text.lexes_cleanly?(self) end
Generated with the Darkfish Rdoc Generator 2.