cvs: php-gtk-doc / liveGen.php

From: Date: Mon, 25 Jul 2005 19:22:19 +0000
Subject: cvs: php-gtk-doc / liveGen.php
Groups: php.gtk.doc 
Request: Send a blank email to php-gtk-doc+get-1473@lists.php.net to get a copy of this message
cweiske Mon Jul 25 15:22:19 2005 EDT Modified files: /php-gtk-doc liveGen.php Log: Small fix so that the generated test_manual.xml doesn't contain so much empty lines http://cvs.php.net/diff.php/php-gtk-doc/liveGen.php?r1=1.2&r2=1.3&ty=u Index: php-gtk-doc/liveGen.php diff -u php-gtk-doc/liveGen.php:1.2 php-gtk-doc/liveGen.php:1.3 --- php-gtk-doc/liveGen.php:1.2 Fri May 20 00:01:09 2005 +++ php-gtk-doc/liveGen.php Mon Jul 25 15:22:19 2005 @@ -391,6 +391,7 @@ $nMaxId = substr_count(implode("\r\n", $arContents), ' id="'); } + $nEmptyLines = 0; foreach ($arContents as $strLine) { if (!$bWaiting) { //find an id @@ -409,10 +410,16 @@ $bWaiting = true; } } else { - //I deactivated this if statement because the programlisting examples wouldn't have empty lines - //if (trim($strLine) != '') { + if (trim($strLine) == '') { + $nEmptyLines++; + } else { + $nEmptyLines = 0; + } + //We can't remove all the empty lines because the programlisting examples wouldn't have empty lines then + //but they won't have more than 3 empty lines in a row, I hope + if ($nEmptyLines < 3) { $strStrippedContents .= $strLine; - //} + } } } else { //find closing tag

« previous php.gtk.doc (#1473) next »