summaryrefslogtreecommitdiff
path: root/inc/geshi/php-brief.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/geshi/php-brief.php')
-rw-r--r--inc/geshi/php-brief.php28
1 files changed, 24 insertions, 4 deletions
diff --git a/inc/geshi/php-brief.php b/inc/geshi/php-brief.php
index dd6781d5d..2a5d78611 100644
--- a/inc/geshi/php-brief.php
+++ b/inc/geshi/php-brief.php
@@ -4,7 +4,7 @@
* -------------
* Author: Nigel McNie (nigel@geshi.org)
* Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
- * Release Version: 1.0.8.3
+ * Release Version: 1.0.8.4
* Date Started: 2004/06/02
*
* PHP (brief version) language file for GeSHi.
@@ -185,8 +185,28 @@ $language_data = array (
3 => array(
'<script language="php">' => '</script>'
),
- 4 => "/(<\?(?:php)?)(?:'(?:[^'\\\\]|\\\\.)*?'|\"(?:[^\"\\\\]|\\\\.)*?\"|\/\*(?!\*\/).*?\*\/|.)*?(\?>|\Z)/sm",
- 5 => "/(<%)(?:'(?:[^'\\\\]|\\\\.)*?'|\"(?:[^\"\\\\]|\\\\.)*?\"|\/\*(?!\*\/).*?\*\/|.)*?(%>|\Z)/sm"
+ 4 => "/(?<start><\\?(?>php\b)?)(?:".
+ "(?>[^\"'?\\/<]+)|".
+ "\\?(?!>)|".
+ "(?>'(?>[^'\\\\]|\\\\'|\\\\\\\|\\\\)*')|".
+ "(?>\"(?>[^\"\\\\]|\\\\\"|\\\\\\\\|\\\\)*\")|".
+ "(?>\\/\\*(?>[^\\*]|(?!\\*\\/)\\*)*\\*\\/)|".
+ "\\/\\/(?>.*?$)|".
+ "\\/(?=[^*\\/])|".
+ "<(?!<<)|".
+ "<<<(?<phpdoc>\w+)\s.*?\s\k<phpdoc>".
+ ")*(?<end>\\?>|\Z)/sm",
+ 5 => "/(?<start><%)(?:".
+ "(?>[^\"'%\\/<]+)|".
+ "%(?!>)|".
+ "(?>'(?>[^'\\\\]|\\\\'|\\\\\\\|\\\\)*')|".
+ "(?>\"(?>[^\\\"\\\\]|\\\\\"|\\\\\\\\|\\\\)*\")|".
+ "(?>\\/\\*(?>[^\\*]|(?!\\*\\/)\\*)*\\*\\/)|".
+ "\\/\\/(?>.*?$)|".
+ "\\/(?=[^*\\/])|".
+ "<(?!<<)|".
+ "<<<(?<phpdoc>\w+)\s.*?\s\k<phpdoc>".
+ ")*(?<end>%>)/sm"
),
'HIGHLIGHT_STRICT_BLOCK' => array(
0 => true,
@@ -199,4 +219,4 @@ $language_data = array (
'TAB_WIDTH' => 4
);
-?>
+?> \ No newline at end of file