lib/rouge/lexers/tex.rb in rouge-2.0.6 vs lib/rouge/lexers/tex.rb in rouge-2.0.7

- old
+ new

@@ -6,17 +6,14 @@ title "TeX" desc "The TeX typesetting system" tag 'tex' aliases 'TeX', 'LaTeX', 'latex' - filenames '*.tex', '*.aux', '*.toc' + filenames '*.tex', '*.aux', '*.toc', '*.sty', '*.cls' mimetypes 'text/x-tex', 'text/x-latex' def self.analyze_text(text) - return 1 if text =~ /\A\s*\\documentclass/ - return 1 if text =~ /\A\s*\\input/ - return 1 if text =~ /\A\s*\\documentstyle/ - return 1 if text =~ /\A\s*\\relax/ + return 1 if text =~ /\A\s*\\(documentclass|input|documentstyle|relax|ProvidesPackage|ProvidesClass)/ end command = /\\([a-z]+|\s+|.)/i state :general do