class Rouge::Lexers::Turtle
Public Class Methods
analyze_text(text)
click to toggle source
# File lib/rouge/lexers/turtle.rb, line 14 def self.analyze_text(text) start = text[0..1000] return 0.5 if start =~ %r(@prefix\b) return 0.5 if start =~ %r(@base\b) return 0.4 if start =~ %r(PREFIX\b)i return 0.4 if start =~ %r(BASE\b)i end