diff options
author | Kornelius Kalnbach <murphy@rubychan.de> | 2013-03-10 21:44:53 +0100 |
---|---|---|
committer | Kornelius Kalnbach <murphy@rubychan.de> | 2013-03-10 21:44:53 +0100 |
commit | af0d7d807c87097346584d06b7be59b5c5e656e2 (patch) | |
tree | 64b3eec10c23c920699115369c1ad01e74769537 /lib/coderay/scanners/php.rb | |
parent | 46fc5486cde5cf1816cba945eb74eff5a8228aa7 (diff) | |
parent | 3d7f34571a0b2e58ee90498bc54f160bda2bed45 (diff) | |
download | coderay-af0d7d807c87097346584d06b7be59b5c5e656e2.tar.gz |
Merge branch 'master' into multiline-inline-diff
Diffstat (limited to 'lib/coderay/scanners/php.rb')
-rw-r--r-- | lib/coderay/scanners/php.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/coderay/scanners/php.rb b/lib/coderay/scanners/php.rb index 8acfff5..6c68834 100644 --- a/lib/coderay/scanners/php.rb +++ b/lib/coderay/scanners/php.rb @@ -1,4 +1,4 @@ -# encoding: ASCII-8BIT +# encoding: utf-8 module CodeRay module Scanners @@ -11,7 +11,6 @@ module Scanners register_for :php file_extension 'php' - encoding 'BINARY' KINDS_NOT_LOC = HTML::KINDS_NOT_LOC @@ -211,7 +210,7 @@ module Scanners HTML_INDICATOR = /<!DOCTYPE html|<(?:html|body|div|p)[> ]/i - IDENTIFIER = /[a-z_\x7f-\xFF][a-z0-9_\x7f-\xFF]*/i + IDENTIFIER = 'ä'[/[[:alpha:]]/] == 'ä' ? Regexp.new('[[:alpha:]_[^\0-\177]][[:alnum:]_[^\0-\177]]*') : Regexp.new('[a-z_\x7f-\xFF][a-z0-9_\x7f-\xFF]*', true) VARIABLE = /\$#{IDENTIFIER}/ OPERATOR = / |