This queue is for tickets about the Parse-BBCode CPAN distribution.
Maintainer(s)' notes
If you have any wishes, feel free to create a ticket.
Plans:
I would like to add callbacks to the parser so that you can gather some information about specific tags and ideally can manipulate them during parsing.
But there are already enough informations to create a download link for code tags, for example. See example/code_download.pl.
Parse::BBCode is now hosted on github, so for bug reports also check
https://github.com/perlpunk/Parse-BBCode
Owner: |
Nobody in particular
|
Requestors: |
redneb [...] gmx.com
|
Cc: |
|
AdminCc: |
|
|
Severity: |
(no value)
|
Broken in: |
(no value)
|
Fixed in: |
0.09 |
|
Tue May 05 01:25:41 2009
redneb [...] gmx.com - Ticket created
In the following code
my %tags=(Parse::BBCode::XHTML->defaults);
my $bb1=Parse::BBCode::XHTML->new({tags=>\%tags});
my $bb2=Parse::BBCode::XHTML->new({tags=>\%tags});
print "FAIL\n" if $bb1->render("\n") ne $bb2->render("\n");
the two BBCode objects do not produce the same output despite being
created with the same parameters. The first one gives the correct
output which is "<br />\n", but the second one gives "\n". The reason
seems to be that the Parse::BBCode::XHTML->new method modifies the %tags
hash in a way that the new hash is not equivalent with the original one.
This is why the following works just fine:
my %tags=(Parse::BBCode::XHTML->defaults);
my $bb1=Parse::BBCode::XHTML->new({tags=>{%tags}});
my $bb2=Parse::BBCode::XHTML->new({tags=>{%tags}});
print "FAIL\n" if $bb1->render("\n") ne $bb2->render("\n");
I think the constructor should make a private copy of this hash so that
it can modify it safely.
Wed May 06 04:31:06 2009
TINITA [...] cpan.org - Correspondence added
On Di. 05. Mai 2009, 01:25:41, redneb@gmx.com wrote:
Show quoted text> I think the constructor should make a private copy of this hash so
that
Show quoted text> it can modify it safely.
thanks for the report, that's correct and should be easy to fix. I have
a minor change waiting to be released, so I hope to upload a new
version soon.
tina
Wed May 06 04:31:08 2009
The RT System itself - Status changed from 'new' to 'open'
Thu May 21 13:09:40 2009
TINITA [...] cpan.org - Broken in 0.09 added
Thu May 21 13:13:54 2009
TINITA [...] cpan.org - Broken in 0.09 deleted
Thu May 21 13:13:54 2009
TINITA [...] cpan.org - Fixed in 0.09 added
Sat May 23 12:47:33 2009
TINITA [...] cpan.org - Status changed from 'open' to 'resolved'