[publican-list] [Bug 718717] New: line numbering of <programlisting> broken
bugzilla at redhat.com
bugzilla at redhat.com
Mon Jul 4 11:57:33 UTC 2011
Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.
Summary: line numbering of <programlisting> broken
https://bugzilla.redhat.com/show_bug.cgi?id=718717
Summary: line numbering of <programlisting> broken
Product: Publican
Version: 2.5
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: medium
Priority: low
Component: publican
AssignedTo: jfearn at redhat.com
ReportedBy: jfearn at redhat.com
QAContact: rlandman at redhat.com
CC: jfearn at redhat.com, mmcallis at redhat.com,
publican-list at redhat.com, r.landmann at redhat.com,
Klaus.Malorny at knipp.de
Depends on: 653432
Classification: Other
Story Points: ---
Clone Of: 653432
+++ This bug was initially created as a clone of Bug #653432 +++
This applies to publican 2.3:
if the linenumbering="numbered" attribute is being set, various problems occur:
* syntax highlighting (via language attribute) no longer works
* line numbering starts a 0 (startinglinenumber not honoured anyway)
* if the content contains < and & (either via CDATA or numeric entities),
they are literally interpreted as XML, causing parsing errors
The problems can be traced down to the numberLines function in Builder.pm:
* the node list converted to a string. I guess that syntax highlighting
happens before, so all generated markup is lost due to this conversion
* the $count variable is initialized to zero, the line number generation
uses $count++, causing the 0
* the augmented content is then converted back to a document fragment by simply
parsing the content with an XML parser. As special characters (<, &)
are not escaped, they are interpreted as XML
--- Additional comment from jfearn at redhat.com on 2011-03-13 07:11:40 EDT ---
Hi Klaus, I've committed fixes to startinglinenumber and the use of <, >, etc.
The code highlight fix will take a bit longer, the modified tree isn't being
passed to the function so I'll need to track down why it's getting stale data
passed in from XSLT.
--
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the publican-list
mailing list