Skip to content

Commit d9bb7f2

Browse files
committed
replace weird regexp that confuses ruby-head
1 parent 9e95941 commit d9bb7f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/coderay/scanners/python.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class Python < Scanner
6161
add(PREDEFINED_VARIABLES_AND_CONSTANTS, :predefined_constant).
6262
add(PREDEFINED_EXCEPTIONS, :exception) # :nodoc:
6363

64-
NAME = / [^\W\d] \w* /x # :nodoc:
64+
NAME = / [[:alpha:]_] \w* /x # :nodoc:
6565
ESCAPE = / [abfnrtv\n\\'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} /x # :nodoc:
6666
UNICODE_ESCAPE = / u[a-fA-F0-9]{4} | U[a-fA-F0-9]{8} | N\{[-\w ]+\} /x # :nodoc:
6767

0 commit comments

Comments
 (0)