#30456 [Opn]: Livedocs malforms example code

From: Date: Tue, 19 Oct 2004 04:03:08 +0000
Subject: #30456 [Opn]: Livedocs malforms example code
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969364585@lists.php.net to get a copy of this message
ID: 30456 Updated by: curt@php.net Reported By: aidan@php.net Status: Open Bug Type: Livedocs problem PHP Version: Irrelevant New Comment: Nuno, You might be seing my changes I made for the patch. The problem is that hightlight_string() doesn't put &nbsp; in all places where a space occurs, causing in some places a ' ' to get compressed thus loosing indententation. Here is an example of the white space compression (example Extending the Exception class): http://livedocs.homelinux.com/en/language.oop5.exceptions.html Note: 1) indentation in actual code is four spaces. this only produces 3. 2) the comments withing /* */ get malformed. CSS might be able to fix this problem, I'll look into instead of translating all spaces to &nbsp; I'm not sure exactly why the original translations of '\n ' to '<br>&nbsp;' was there but I'm assuming its due to the behaviour of highlight_string(). Previous Comments: ------------------------------------------------------------------------ [2004-10-19 05:08:37] aidan@php.net Whitespce in any element which hasn't set preserve to true will be ignored in most circumstances. Using &nbsp; won't be ignored, or setting preserve-whitespace in the CSS. Then you can not use &nbsp; at all. ------------------------------------------------------------------------ [2004-10-17 12:48:12] nlopess@php.net Sorry for my stupidity, but I couldn't find where the problem is... and nor how the patch would fix the problem. The patch will also create a bigger page (by replacing ' &nbsp;' with two &nbsp;) ------------------------------------------------------------------------ [2004-10-17 06:25:38] curt@php.net here is a patch to fix the white space issue: http://www.powertrip.co.za/livedocs/viewpatch.php?patch=17 ------------------------------------------------------------------------ [2004-10-17 04:48:02] aidan@php.net http://livedocs.zirzow.dyndns.org/index.php?l=en&q=language.oop5.exceptions Look at the docblock, the first space is truncated. All the programlistings have 3 spaces for the first indent, though 4 are in the code. ------------------------------------------------------------------------ [2004-10-16 21:03:38] nlopess@php.net Can you please give an example page that doesn't work? If I remember well, Ilia has applied one of my patches a while ago that fixed this. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/30456 -- Edit this bug report at http://bugs.php.net/?id=30456&edit=1

« previous php.doc (#969364585) next »