diff options
Diffstat (limited to 'lib/coderay')
-rw-r--r-- | lib/coderay/helpers/file_type.rb | 6 | ||||
-rw-r--r-- | lib/coderay/scanners/php.rb | 1 | ||||
-rw-r--r-- | lib/coderay/scanners/python.rb | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/lib/coderay/helpers/file_type.rb b/lib/coderay/helpers/file_type.rb index 7b90918..637001b 100644 --- a/lib/coderay/helpers/file_type.rb +++ b/lib/coderay/helpers/file_type.rb @@ -90,8 +90,8 @@ module CodeRay 'gvy' => :groovy, 'h' => :c, 'haml' => :haml, - 'htm' => :page, - 'html' => :page, + 'htm' => :html, + 'html' => :html, 'html.erb' => :erb, 'java' => :java, 'js' => :java_script, @@ -120,7 +120,7 @@ module CodeRay 'sql' => :sql, # 'ss' => :scheme, 'tmproj' => :xml, - 'xhtml' => :page, + 'xhtml' => :html, 'xml' => :xml, 'yaml' => :yaml, 'yml' => :yaml, diff --git a/lib/coderay/scanners/php.rb b/lib/coderay/scanners/php.rb index dadab00..8acfff5 100644 --- a/lib/coderay/scanners/php.rb +++ b/lib/coderay/scanners/php.rb @@ -1,3 +1,4 @@ +# encoding: ASCII-8BIT module CodeRay module Scanners diff --git a/lib/coderay/scanners/python.rb b/lib/coderay/scanners/python.rb index 5e38a2c..cbdbbdb 100644 --- a/lib/coderay/scanners/python.rb +++ b/lib/coderay/scanners/python.rb @@ -61,7 +61,7 @@ module Scanners add(PREDEFINED_VARIABLES_AND_CONSTANTS, :predefined_constant). add(PREDEFINED_EXCEPTIONS, :exception) # :nodoc: - NAME = / [^\W\d] \w* /x # :nodoc: + NAME = / [[:alpha:]_] \w* /x # :nodoc: ESCAPE = / [abfnrtv\n\\'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} /x # :nodoc: UNICODE_ESCAPE = / u[a-fA-F0-9]{4} | U[a-fA-F0-9]{8} | N\{[-\w ]+\} /x # :nodoc: |