summaryrefslogtreecommitdiff
path: root/inc/geshi.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2010-08-29 09:53:46 +0200
committerAndreas Gohr <andi@splitbrain.org>2010-08-29 09:53:46 +0200
commit7f0d7314a01c4e97a23d7d89bd9a839accd2776a (patch)
treedf8b38bf05fff59f8ddc06c7ca521f019ed8d81d /inc/geshi.php
parent272000286c073349cd0ba898df00c4fe81492461 (diff)
downloadrpg-7f0d7314a01c4e97a23d7d89bd9a839accd2776a.tar.gz
rpg-7f0d7314a01c4e97a23d7d89bd9a839accd2776a.tar.bz2
GeSHi updated to 1.0.8.8
Diffstat (limited to 'inc/geshi.php')
-rw-r--r--inc/geshi.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/inc/geshi.php b/inc/geshi.php
index 14acf15a6..31d2da49f 100644
--- a/inc/geshi.php
+++ b/inc/geshi.php
@@ -41,7 +41,7 @@
//
/** The version of this GeSHi file */
-define('GESHI_VERSION', '1.0.8.6');
+define('GESHI_VERSION', '1.0.8.8');
// Define the root directory for the GeSHi code tree
if (!defined('GESHI_ROOT')) {
@@ -1971,7 +1971,7 @@ class GeSHi {
//All this formats are matched case-insensitively!
static $numbers_format = array(
GESHI_NUMBER_INT_BASIC =>
- '(?<![0-9a-z_\.%])(?<![\d\.]e[+\-])([1-9]\d*?|0)(?![0-9a-z]|\.(?:[eE][+\-]?)?\d)',
+ '(?:(?<![0-9a-z_\.%])|(?<=\.\.))(?<![\d\.]e[+\-])([1-9]\d*?|0)(?![0-9a-z]|\.(?:[eE][+\-]?)?\d)',
GESHI_NUMBER_INT_CSTYLE =>
'(?<![0-9a-z_\.%])(?<![\d\.]e[+\-])([1-9]\d*?|0)l(?![0-9a-z]|\.(?:[eE][+\-]?)?\d)',
GESHI_NUMBER_BIN_SUFFIX =>
@@ -2019,7 +2019,7 @@ class GeSHi {
}
$this->language_data['NUMBERS_RXCACHE'][$key] =
- "/(?<!<\|\/)(?<!<\|!REG3XP)(?<!<\|\/NUM!)(?<!\d\/>)($regexp)(?!(?:<DOT>|[^\<])+>)(?![^<]*>)(?!\|>)(?!\/>)/i"; //
+ "/(?<!<\|\/)(?<!<\|!REG3XP)(?<!<\|\/NUM!)(?<!\d\/>)($regexp)(?!(?:<DOT>|(?>[^\<]))+>)(?![^<]*>)(?!\|>)(?!\/>)/i"; //
}
}
@@ -2651,7 +2651,8 @@ class GeSHi {
$start = $i + $hq_strlen;
while ($close_pos = strpos($part, $this->language_data['HARDQUOTE'][1], $start)) {
$start = $close_pos + 1;
- if ($this->lexic_permissions['ESCAPE_CHAR'] && $part[$close_pos - 1] == $this->language_data['HARDCHAR']) {
+ if ($this->lexic_permissions['ESCAPE_CHAR'] && $part[$close_pos - 1] == $this->language_data['HARDCHAR'] &&
+ (($i + $hq_strlen) != ($close_pos))) { //Support empty string for HQ escapes if Starter = Escape
// make sure this quote is not escaped
foreach ($this->language_data['HARDESCAPE'] as $hardescape) {
if (substr($part, $close_pos - 1, strlen($hardescape)) == $hardescape) {