summaryrefslogtreecommitdiffstats
path: root/application/libraries/geshi/diff.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2011-10-31 20:56:06 +0100
committerFlorian Pritz <bluewind@xinu.at>2011-10-31 20:56:06 +0100
commitf0fb5945f064ea99c457a56b6cb3973b9c94d66c (patch)
treec5490296a29512758a0b9f76964ed8a3b44759d0 /application/libraries/geshi/diff.php
parent79e970fd0078ac0e67f2f2e0294e5c7901626fe9 (diff)
fix unified diff highlighting
We shouldn't recolor "ed commands" when they appear in a unified diff. To make this work we have to mark comment lines so the css selector can find them. Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/libraries/geshi/diff.php')
-rw-r--r--application/libraries/geshi/diff.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/application/libraries/geshi/diff.php b/application/libraries/geshi/diff.php
index f1a4baf65..2d88df06b 100644
--- a/application/libraries/geshi/diff.php
+++ b/application/libraries/geshi/diff.php
@@ -103,6 +103,7 @@ $language_data = array (
7 => 'color: #991111;',
8 => 'color: #00b000;',
9 => 'color: #888822;',
+ 10 => '',
),
),
'URLS' => array(
@@ -185,6 +186,14 @@ $language_data = array (
GESHI_BEFORE => '',
GESHI_AFTER => ''
),
+ //context lines
+ 10 => array(
+ GESHI_SEARCH => '^ .*$',
+ GESHI_REPLACE => '\\0',
+ GESHI_MODIFIERS => 'm',
+ GESHI_BEFORE => '',
+ GESHI_AFTER => ''
+ ),
),
'STRICT_MODE_APPLIES' => GESHI_NEVER,
'SCRIPT_DELIMITERS' => array(