summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners/php.rb
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2011-08-19 03:09:35 +0200
committerKornelius Kalnbach <murphy@rubychan.de>2011-08-19 03:09:35 +0200
commit75bc5455af8c3c3381066aac3d5fff42264cac6f (patch)
tree589d2c912ddd94c517eb794bcdf3257f8348f3c0 /lib/coderay/scanners/php.rb
parentfdd17b6a09efb275238a3baef275465d31452f2a (diff)
downloadcoderay-75bc5455af8c3c3381066aac3d5fff42264cac6f.tar.gz
Major rewrite of encoders to support IO output; fixed some minor scanner bugs; cleanups; dropped NitroXHTML scanner; improved tests
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 c290dab..b2632a2 100644
--- a/lib/coderay/scanners/php.rb
+++ b/lib/coderay/scanners/php.rb
@@ -234,8 +234,8 @@ module Scanners
def scan_tokens encoder, options
if check(RE::PHP_START) || # starts with <?
- (match?(/\s*<\S/) && check(/.{1,100}#{RE::PHP_START}/om)) || # starts with tag and contains <?
- check(/.{1,100}#{RE::HTML_INDICATOR}/om) ||
+ (match?(/\s*<\S/) && check(/.{1,1000}#{RE::PHP_START}/om)) || # starts with tag and contains <?
+ check(/.{0,1000}#{RE::HTML_INDICATOR}/om) ||
check(/.{1,100}#{RE::PHP_START}/om) # PHP start after max 100 chars
# is HTML with embedded PHP, so start with HTML
states = [:initial]