[prev in list] [next in list] [prev in thread] [next in thread]
List: pear-doc
Subject: [PEAR-DOC] cvs: peardoc / colorize.php
From: "Greg Beaver" <cellog () php ! net>
Date: 2003-10-30 4:18:44
[Download RAW message or body]
cellog Wed Oct 29 23:18:44 2003 EDT
Modified files:
/peardoc colorize.php
Log:
fix highlight_string() issues - if they fix highlight_string() in a
future php version, the fix should still work, as there would be no <br />
Index: peardoc/colorize.php
diff -u peardoc/colorize.php:1.1 peardoc/colorize.php:1.2
--- peardoc/colorize.php:1.1 Mon Sep 30 22:40:51 2002
+++ peardoc/colorize.php Wed Oct 29 23:18:43 2003
@@ -18,7 +18,7 @@
// | Martin Jansen <mj@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: colorize.php,v 1.1 2002/10/01 02:40:51 alexmerz Exp $
+// $Id: colorize.php,v 1.2 2003/10/30 04:18:43 cellog Exp $
//
/**
@@ -175,6 +175,9 @@
highlight_string($example);
$colored_example = ob_get_contents();
ob_end_clean();
+
+ // add \n to fix highlight_string() for cut-and-pasting examples
+ $colored_example = str_replace('<br />', "\n", $colored_example);
return '<PRE CLASS="php">' . $colored_example . '</PRE';
}
--
PEAR Documentation List Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic