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: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]
        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 [email protected] 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.

_______________________________________________
publican-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/publican-list
Wiki: https://fedorahosted.org/publican

Reply via email to