cvs: peardoc / colorize.php

From: Date: Thu, 30 Oct 2003 04:18:44 +0000
Subject: cvs: peardoc / colorize.php
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-1819@lists.php.net to get a copy of this message
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'; }

« previous php.pear.doc (#1819) next »