diff options
Diffstat (limited to 'lib/coderay/scanners/php.rb')
-rw-r--r-- | lib/coderay/scanners/php.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/coderay/scanners/php.rb b/lib/coderay/scanners/php.rb index 8ec1196..c290dab 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/) && exist?(RE::PHP_START)) || # starts with tag and contains <? - exist?(RE::HTML_INDICATOR) || + (match?(/\s*<\S/) && check(/.{1,100}#{RE::PHP_START}/om)) || # starts with tag and contains <? + check(/.{1,100}#{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] |