Skip Menu |

This queue is for tickets about the SVG CPAN distribution.

Report information
The Basics
Id: 44494
Status: resolved
Priority: 0/
Queue: SVG

People
Owner: Nobody in particular
Requestors: cpan.wade [...] anomaly.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 2.49
Fixed in: (no value)



Subject: Linebreaks for formatting elements occur in unexpected places
I'm trying to reproduce an SVG file with SVG.pm that I had been generating by another method. One thing that I found that was not expected was the handling of the '-elsep' element separator code. 1. With the DTD turned off (-inline=1), the XML declaration gets a trailing 'elsep' and the svg tag gets a leading 'elsep' resulting in an expected blank line. 2. Any element containing cdata received no 'elsep' before the start tag, but receives an 'elsep' before the end tag. This looks really funny on short pieces of text. 3. An element containing cdata also receives an 'indent' before the end tag, this changes the content of the tag (for instance if xml:space is preserve). 4. An XML comment does not get prefixed with an 'elsep' and 'indent'. There are arguably a number of ways the 'pretty printing' could be handled. Since the rest of your reformatting closely follows what I've done for years, I was a little surprised at these differences.
On Mon Mar 23 20:03:43 2009, GWADEJ wrote: Show quoted text
> I'm trying to reproduce an SVG file with SVG.pm that I had been > generating by another method. > > One thing that I found that was not expected was the handling of the > '-elsep' element separator code.
I'm attaching a patch that provides a new test file covering these cases and a patch that makes pretty printing work the way I would like to see it.

Message body is not shown because it is too large.

Good patch, thanks. I applied it to SVG in version 2.50 and fixed some other minor issues in the code and test cases. Florent