class Rouge::Lexers::Diff
Public Class Methods
Source
# File lib/rouge/lexers/diff.rb, line 14 def self.detect?(text) return true if text.start_with?('Index: ') return true if text =~ %r(\Adiff[^\n]*?\ba/[^\n]*\bb/) return true if text =~ /---.*?\n[+][+][+]/ || text =~ /[+][+][+].*?\n---/ end