summaryrefslogtreecommitdiff
path: root/inc/geshi.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/geshi.php')
-rw-r--r--inc/geshi.php13
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 &copy; 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