diff options
author | Andreas Gohr <andi@splitbrain.org> | 2006-02-25 15:25:20 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2006-02-25 15:25:20 +0100 |
commit | 732c5c93b8e4437eb43f4115569812823804bf4e (patch) | |
tree | a257517a3880da779c17ab9abbcd9e8dcaf153d3 /inc/geshi.php | |
parent | 403f3b3b118686f8b5c9f8a3441400e02923f82a (diff) | |
download | rpg-732c5c93b8e4437eb43f4115569812823804bf4e.tar.gz rpg-732c5c93b8e4437eb43f4115569812823804bf4e.tar.bz2 |
GeSHi update to 1.0.7.7
There's been a few more languages added, namely ColdFusion, T-SQL,
Robots.txt, AutoIT and Java 5, and a couple of bug fixes.
darcs-hash:20060225142520-7ad00-f70f971f69a947dcde4ae7bc2d8378ff250a4cb1.gz
Diffstat (limited to 'inc/geshi.php')
-rw-r--r-- | inc/geshi.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/inc/geshi.php b/inc/geshi.php index 6f54077cd..ef12b10c6 100644 --- a/inc/geshi.php +++ b/inc/geshi.php @@ -28,7 +28,7 @@ * @author Nigel McNie <nigel@geshi.org> * @copyright Copyright © 2004, 2005, Nigel McNie * @license http://gnu.org/copyleft/gpl.html GNU GPL - * @version $Id: geshi.php,v 1.28 2006/01/21 23:31:39 oracleshinoda Exp $ + * @version $Id: geshi.php,v 1.30 2006/02/25 00:46:33 oracleshinoda Exp $ * */ @@ -40,7 +40,7 @@ // /** The version of this GeSHi file */ -define('GESHI_VERSION', '1.0.7.6'); +define('GESHI_VERSION', '1.0.7.7'); /** Set the correct directory separator */ define('GESHI_DIR_SEPARATOR', ('WIN' != substr(PHP_OS, 0, 3)) ? '/' : '\\'); @@ -2015,10 +2015,15 @@ class GeSHi // almost exactly the same thing, except the second one prevents a number // being highlighted twice (eg <span...><span...>5</span></span>) // Put /NUM!/ in for the styles, which gets replaced at the end. + // + // NEW ONE: Brice Bernard + // $stuff_to_parse = preg_replace('/([^(\\w|#|\\\|"|\')])(\\d+)/', '\\1<|/NUM!/>\\2|>', $stuff_to_parse); + //$stuff_to_parse = preg_replace('/([-+]?\\b(?:[0-9]*\\.)?[0-9]+\\b)/', '<|/NUM!/>\\1|>', $stuff_to_parse); // if ($this->lexic_permissions['NUMBERS'] && preg_match('#[0-9]#', $stuff_to_parse )) { - $stuff_to_parse = preg_replace('#([^a-zA-Z0-9_\#])([0-9]+)([^a-zA-Z0-9])#', "\\1<|/NUM!/>\\2|>\\3", $stuff_to_parse); - $stuff_to_parse = preg_replace('#([^a-zA-Z0-9_\#>])([0-9]+)([^a-zA-Z0-9])#', "\\1<|/NUM!/>\\2|>\\3", $stuff_to_parse); + //$stuff_to_parse = preg_replace('#([^a-zA-Z0-9_\#])([0-9]+)([^a-zA-Z0-9])#', "\\1<|/NUM!/>\\2|>\\3", $stuff_to_parse); + //$stuff_to_parse = preg_replace('#([^a-zA-Z0-9_\#>])([0-9]+)([^a-zA-Z0-9])#', "\\1<|/NUM!/>\\2|>\\3", $stuff_to_parse); + $stuff_to_parse = preg_replace('/([-+]?\\b(?:[0-9]*\\.)?[0-9]+\\b)/', '<|/NUM!/>\\1|>', $stuff_to_parse); } // Highlight keywords |