Parent

Methods

Class/Module Index [+]

Quicksearch

Rouge::Lexers::Diff

Public Class Methods

analyze_text(text) click to toggle source
# File lib/rouge/lexers/diff.rb, line 11
def self.analyze_text(text)
  return 1   if text.start_with?('Index: ')
  return 1   if text.start_with?('diff ')

  return 0.9 if text =~ /\A---.*?\n\+\+\+/
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.