summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners/php.rb
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2013-03-10 22:47:00 +0100
committerKornelius Kalnbach <murphy@rubychan.de>2013-03-10 22:47:00 +0100
commit0c98047ea276f393daa8249cf9c124ebc08266d2 (patch)
tree71e7333e04e7fd1ff12fa9351886faeec2701671 /lib/coderay/scanners/php.rb
parent250373646c32e3c135fb4068b195b578cbdc5870 (diff)
parentfc16be24d48f8a729ac987149f98f19725943e0d (diff)
downloadcoderay-0c98047ea276f393daa8249cf9c124ebc08266d2.tar.gz
Merge branch 'master' into paint-integration
Diffstat (limited to 'lib/coderay/scanners/php.rb')
-rw-r--r--lib/coderay/scanners/php.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/coderay/scanners/php.rb b/lib/coderay/scanners/php.rb
index dadab00..6c68834 100644
--- a/lib/coderay/scanners/php.rb
+++ b/lib/coderay/scanners/php.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
module CodeRay
module Scanners
@@ -10,7 +11,6 @@ module Scanners
register_for :php
file_extension 'php'
- encoding 'BINARY'
KINDS_NOT_LOC = HTML::KINDS_NOT_LOC
@@ -210,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 = /