class Rouge::Lexers::Smarty
def self.analyze_text(text)
def self.analyze_text(text) rv = 0.0 rv += 0.15 if text =~ /\{if\s+.*?\}.*?\{\/if\}/ rv += 0.15 if text =~ /\{include\s+file=.*?\}/ rv += 0.15 if text =~ /\{foreach\s+.*?\}.*?\{\/foreach\}/ rv += 0.01 if text =~ /\{\$.*?\}/ return rv end
def self.builtins
def self.builtins @builtins ||= %w( append assign block call capture config_load debug extends for foreach foreachelse break continue function if elseif else include include_php insert ldelim rdelim literal nocache php section sectionelse setfilter strip while counter cycle eval fetch html_checkboxes html_image html_options html_radios html_select_date html_select_time html_table mailto math textformat capitalize cat count_characters count_paragraphs count_sentences count_words date_format default escape from_charset indent lower nl2br regex_replace replace spacify string_format strip strip_tags to_charset truncate unescape upper wordwrap ) end