Created attachment 315955 [details] The generated HTML page Description of problem: Publican incorrectly formats <programlisting> and <screen> sections in DocBook. As explained in both http://docbook.org/tdg/en/html/programlisting.html and http://docbook.org/tdg/en/html/screen.html, all whitespace and line breaks in those sections are significant and must be preserved. The current version of publican does not preserve line-breaks correctly in either of these tags. Version-Release number of selected component (if applicable): publican-0.34-0.fc9.noarch How reproducible: Always Steps to Reproduce: 1. Add the following section to a default Publican document (I did it in an article): <programlisting format="linespecific"><computeroutput>[root@localhost ~]# </computeroutput><userinput>mkdir /tmp/one</userinput> <computeroutput>[root@localhost ~]# </computeroutput><userinput>mkdir /tmp/two</userinput> <computeroutput>[root@localhost ~]# </computeroutput><userinput>mkdir /tmp/three</userinput></programlisting> 2. Create both PDF and HTML versions of the document 3. Notice how the line breaks are not correct. The PDF doesn't add line breaks where they belong, and the HTML adds extra line breaks and extra indents. Actual results: See the attached files... I'm attaching both a PDF and HTML version. Expected results: Three individual lines, that look like: [root@localhost ~]# mkdir /tmp/one [root@localhost ~]# mkdir /tmp/two [root@localhost ~]# mkdir /tmp/three Additional info: I tried out the "Fedora" branding in publican as well, and it suffered from the same formatting problems.
Created attachment 315956 [details] The generated PDF file
Murray McAllister kindly pointed out that this bug is probably related to bug #461221.
Non-verbatim tags are fully entitled to munch you white space, even when nested inside verbatim tags.
This was a bug! The new line was being removed from the verbatim tag itself and not from an inline tag within the verbatim tag. e.g. 1 This will, correctly, have it's new line removed because computeroutput is an inline tag and inline tags never, ever, EVER respect white space: <screen><computeroutput> Preparing... ######################################### [100%] 1:foo ######################################### [100%]</computeroutput></screen> e.g. 2 This would have it's new line removed because the userinput tag swallowed up the following new line: <programlisting> [root@localhost ~]# <userinput>mkdir /tmp/one</userinput> [root@localhost ~]# <userinput>mkdir /tmp/two</userinput> </programlisting> This second is a bug because the new line is in the verbatim screen tag and not inside the inline userinput tag. Changed white space munching code to respect new lines directly in verbatim tags regardless of what precedes them.
Thanks for revisiting this one, Jeff!
publican-0.38-0.fc9,perl-XML-TreeBuilder-3.09-11.fc9 has been submitted as an update for Fedora 9. http://admin.fedoraproject.org/updates/publican-0.38-0.fc9,perl-XML-TreeBuilder-3.09-11.fc9
publican-0.38-0.fc9, perl-XML-TreeBuilder-3.09-11.fc9 has been pushed to the Fedora 9 stable repository. If problems still persist, please make note of it in this bug report.