Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0a1

Bug #10558 Extra Leading Space in Sourcode View
Submitted: 2007-03-29 21:05 UTC
From: ashnazg Assigned: ashnazg
Status: Wont fix Package: PhpDocumentor (version CVS)
PHP Version: 5.1.6 OS: WinXP
Roadmaps: (Not assigned)    
Subscription  


 [2007-03-29 21:05 UTC] ashnazg (Chuck Burgess)
Description: ------------ Using any of the PHP v5 versions (5.1.6, 5.2.0, 5.2.1) I run PhpDocumentor (CVS Head) against, in the sourcecode view of the source file, all subsequent lines of a multiline tag description get an extra leading space. Test script: --------------- <?php /** * Page Directive for BugReport3.php * * @author $Author$ * @version $Name$ * @package BugReports * @todo NEEDS PAGE DIRECTIVE * WRITTEN AND UNDERSTOOD * BUT NOT IMMORTALIZED */ ?> Expected result: ---------------- <?php /** * Page Directive for BugReport3.php * * @author $Author$ * @version $Name$ * @package BugReports * @todo NEEDS PAGE DIRECTIVE * WRITTEN AND UNDERSTOOD * BUT NOT IMMORTALIZED */ ?> Actual result: -------------- <?php /** * Page Directive for BugReport3.php * * @author $Author$ * @version $Name$ * @package BugReports * @todo NEEDS PAGE DIRECTIVE * WRITTEN AND UNDERSTOOD * BUT NOT IMMORTALIZED */ ?>

Comments

 [2007-03-29 21:06 UTC] ashnazg (Chuck Burgess)
I forgot to explicitly mention that this does NOT happen with PHP v4 that I test with (4.4.2, 4.4.4, 4.4.5, 4.4.6).
 [2007-05-31 20:10 UTC] ashnazg (Chuck Burgess)
Looks like a trailing space on the docblock "*" per-line marker (" * ") was colliding with a fully intact description text with all its leading space padding ("&nbps; &nbspTEXT"). Had to add a check to ensure that when given a pure text string (no tags in it), and that string had more than one leading space ("hmmm, leading spacesmust be for lining up indented text"), then we have to prevent the trailing space in "&nbsp*&nbps;" from overspacing the TEXT indention by one.
 [2007-05-31 20:13 UTC] ashnazg (Chuck Burgess)
Started to build a test suite for HighlightParser->getInlineTags() method, but there is proving to be too much object setup required, and I can't deal with it all very well on my one 1024x768 laptop screen... I'm missing my second monitor right about now. I got the test suite file started, with three very simple tests in it, though I couldn't get far enough to build a test specifically covering this bug condition. Greetings from the beach!
 [2007-05-31 20:53 UTC] ashnazg (Chuck Burgess)
!@#$%^... looks like this patch is stripping a space off a tag's description text. I'm not sure why this wasn't evident to me when first developing the patch, unless it's due to the tags in question (class docblock for clone.inc.php) having indention spaces themselves, whereas my test file docblock tags did not have indention spaces. This patch isn't going to suffice.
 [2007-05-31 21:07 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2008-03-31 13:16 UTC] ashnazg (Chuck Burgess)
Verified this bug still exists in v1.4.2 on PHP 5.2.5.
 [2009-10-13 19:13 UTC] ashnazg (Chuck Burgess)
Had revisited this bug, and noticed another problem due to this bug: all the docblock lines that begin with "*" lose their leading space before the "*". So, the multiline indented TODO value is wreaking double havoc...
 [2012-09-01 02:17 UTC] ashnazg (Chuck Burgess)
-Status: Verified +Status: Wont fix -Assigned To: +Assigned To: ashnazg -Roadmap Versions: 1.5.0a1 +Roadmap Versions:
No more feature work on phpDocumentor 1.x. Check out the new phpDocumentor 2.x (http://www.phpdoc.org/).