lib/rouge/lexers/ini.rb in rouge_ecl-0.0.1 vs lib/rouge/lexers/ini.rb in rouge_ecl-1.0.0

- old
+ new

@@ -9,9 +9,13 @@ # TODO add more here filenames '*.ini', '*.INI', '*.gitconfig' mimetypes 'text/x-ini' + def self.analyze_text(text) + return 0.1 if text =~ /\A\[[\w\-.]+\]\s*[\w\-]+=\w+/ + end + identifier = /[\w\-.]+/ state :basic do rule /[;#].*?\n/, Comment rule /\s+/, Text