From d9bb7f2f718d5eb6ac104f7b661e32fae22f808c Mon Sep 17 00:00:00 2001 From: Kornelius Kalnbach Date: Fri, 2 Mar 2012 18:02:58 +0100 Subject: replace weird regexp that confuses ruby-head --- lib/coderay/scanners/python.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/coderay/scanners/python.rb') 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: -- cgit v1.2.1