From 9f6e54e92820754d4f05e7d6ef556c11c5351411 Mon Sep 17 00:00:00 2001 From: murphy Date: Tue, 20 Oct 2009 11:12:26 +0000 Subject: Updated PHP scanner (#36) * highlighting of class and function definitions * improved HTML/PHP detection * heredocs (simple) * a new test for classes --- lib/coderay/scanners/php.rb | 50 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 42 insertions(+), 8 deletions(-) (limited to 'lib/coderay/scanners/php.rb') diff --git a/lib/coderay/scanners/php.rb b/lib/coderay/scanners/php.rb index 700c7cb..bfbc642 100644 --- a/lib/coderay/scanners/php.rb +++ b/lib/coderay/scanners/php.rb @@ -184,7 +184,7 @@ module Scanners HTML_INDICATOR = / ]/i - IDENTIFIER = /[a-z_\x80-\xFF][a-z0-9_\x80-\xFF]*/i + IDENTIFIER = /[a-z_\x7f-\xFF][a-z0-9_\x7f-\xFF]*/i VARIABLE = /\$#{IDENTIFIER}/ OPERATOR = / @@ -205,7 +205,7 @@ module Scanners states = [:initial] if match?(RE::PHP_START) || # starts with