summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2012-04-13 15:41:29 +0200
committerKornelius Kalnbach <murphy@rubychan.de>2012-04-13 15:41:29 +0200
commit5598df049e8823f9838b348e76227ef836c4e39b (patch)
treeff0ae7c93edde90a65f556d894e2c894bdc15487 /lib/coderay/scanners
parent6f3922f4938184d524ba990f0fa3d81531fd9b1e (diff)
parent359db4594e7fc874cf8087f599dc4e96b22e586b (diff)
downloadcoderay-5598df049e8823f9838b348e76227ef836c4e39b.tar.gz
Merge branch 'master' into multiline-inline-diff
Diffstat (limited to 'lib/coderay/scanners')
-rw-r--r--lib/coderay/scanners/php.rb1
-rw-r--r--lib/coderay/scanners/python.rb2
2 files changed, 2 insertions, 1 deletions
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: