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

Doc Bug #10914 Can't use nested tags inside <kbd> or <samp>
Submitted: 2007-05-03 06:26 UTC Modified: 2007-05-31 18:54 UTC
From: cwiedmann Assigned: ashnazg
Status: Closed Package: PhpDocumentor (version 1.4.0a1)
PHP Version: 5.2.1 OS: Windows_NT
Roadmaps: 1.4.0a2    
Subscription  


 [2007-05-03 06:26 UTC] cwiedmann (Carsten Wiedmann)
Description: ------------ That's what I can read in the manual [1]: | Both <code> and <pre> ignore any html listed above | except for their closing tags </code> for <code> | and </pre> for <pre> But sometimes it's necessary to use <br> or <pre> inside <samp> or <kbd>. --> If you have a sample which is not PHP code and you don't want line numbering and/or syntax highlighting. BTW: Why did I have in the same generated HTML file a mix of "\r\n", "\r" and "\n"? (Is the a feature request or a bug.) [1] http://manual.phpdoc.org/HTMLSmartyConverter/default/phpDocumentor/tutorial_phpDocumentor.howto.pkg.html#basics.desc Test script: --------------- /** * Simplified version of PHP's test suite * * <b>Usage</b><br> * <br> * <kbd><b>pear</b> run-tests -r ./tests</kbd> * * <b>Basic Format</b> * <samp><pre> * --TEST-- * // text * --FILE-- * // text * --EXPECT-- * // text * </pre></samp> */ Expected result: ---------------- <p class="short-description">Simplified version of PHP's test suite</p> <p class="description"> <p><strong>Usage</strong> <br /><br /> <kbd><b>pear</b> run-tests -r ./tests</kbd> </p> <p><strong>Basic Format</strong> <samp><pre> --TEST-- // text --FILE-- // text --EXPECT-- // text </pre></samp> </p> </p> Actual result: -------------- <p class="short-description">Simplified version of PHP's test suite</p> <p class="description"> <p><strong>Usage</strong> <br /><br /> <kbd><b>pear</b> run-tests -r /repository/pear-core/tests</kbd> </p> <p><strong>Basic Format</strong> <samp><pre> --TEST-- // text --FILE-- // text --EXPECT-- // text </pre></samp> </p> </p>

Comments

 [2007-05-03 08:42 UTC] cwiedmann (Carsten Wiedmann)
One mistake in my test script. You can't use "<pre>" inside "<samp>", sorry. It must be: | <pre><samp>...</samp><pre> --> This one is working. or | <samp>...<br>...</samp> --> This one is not working. in the "Test script" and the "Expected result". | <kbd><b>...</b></kbd> is still not working.
 [2007-05-03 11:32 UTC] ashnazg (Chuck Burgess)
Confirmed that I can reproduce this behavior, using Carsten's updated example code. I ran my test against all frames, Smarty, and PDF converters and see the <b> issue in all the results. If I understand Carsten's update correctly, the <samp><pre> thing is not an issue, it's only a usage mistake. So the only issue is the <b> being converted to an entity rather than being interpreted as HTML when it is used inside the <kdb> tags.
 [2007-05-04 16:46 UTC] ashnazg (Chuck Burgess)
All the text inside the kbd tags are being passed into the Kbdize() method with the bold tags already entitied...
 [2007-05-30 22:04 UTC] ashnazg (Chuck Burgess)
Reconsidering the logic behind this one... Reading the manual URL in the bug description, I don't really see anything that tells me definitively that any nested tags inside the kdb tag is supposed to be handled as a tag. On the contrary, the gist of the text seems to reiterate "don't expect HTML tags to act like HTML", due to different converters handling the tags differently. Does this bug highlight a need for the manual to more explicitly state "don't try nesting HTML formatting in DocBlock text"?
 [2007-05-31 11:37 UTC] jeichorn (Joshua Eichorn)
We need to at least clarify whats really happening in the manual. It might be nice to support some tag nesting but i don't really consider it worth the effort if its not an easy fix. Lets update the manual and move on.
 [2007-05-31 18:50 UTC] ashnazg (Chuck Burgess)
Patch updates the HOWTO to include KBD tag as one that ignores nested tags inside it.
 [2007-05-31 18:54 UTC] ashnazg (Chuck Burgess)
committed to cvs