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: |
dzirtik [...] gmail.com
|
Cc: |
|
AdminCc: |
|
|
Severity: |
Critical |
Broken in: |
0.13_003 |
Fixed in: |
0.13_004 |
|
Thu Mar 29 04:41:54 2012
http://openid.mail.ru/corp/p.scherbinin - Ticket created
When you parsing a atributes for a tag, your RE lookes like:
$attr =~ s/^(?:"([^"]+)"|(.*?)(?:\s+|$))//
AND
$attr =~ s/^([a-zA-Z0-9]+)=(?:"([^"]+)"|(.*?)(?:\s+|$))//
But there is a problem if space will be after ", so RE IMHO must be:
$attr =~ s/^(?:"([^"]+)"|(.*?))(?:\s+|$)//
AND
$attr =~ s/^([a-zA-Z0-9]+)=(?:"([^"]+)"|(.*?))(?:\s+|$)//
In addition, I would like to be able to use single quotes, like:
[tag foo='bar']
and attributes with underscore (_), like:
[tag foo_bar='boo']
So, I think RE must look like:
$attr =~ s/^(?:"([^"]+)"|(.*?)|'([^']+)')(?:\s+|$)//
AND
$attr =~ s/^([a-zA-Z0-9_]+)=(?:"([^"]+)"|(.*?)|'([^']+)')(?:\s+|$)//
Thank You!
Best Regards,
Pavel Scherbinin
Thu Mar 29 04:53:14 2012
http://openid.mail.ru/corp/p.scherbinin - Correspondence added
I'm sory, of course:
$attr =~ s/^(?:"([^"]+)"|'([^']+)'|(.*?))(?:\s+|$)//
AND
$attr =~ s/^([a-zA-Z0-9_]+)=(?:"([^"]+)"|'([^']+)'|(.*?))(?:\s+|$)//
And may be there:
$attr =~ s/^([a-zA-Z0-9_]+)\s*=\s*(?:"([^"]+)"|'([^']+)'|(.*?))
(?:\s+|$)//
On Thu Mar 29 04:41:54 2012,
http://openid.mail.ru/corp/p.scherbinin
wrote:
Show quoted text> So, I think RE must look like:
> $attr =~ s/^(?:"([^"]+)"|(.*?)|'([^']+)')(?:\s+|$)//
> AND
> $attr =~ s/^([a-zA-Z0-9_]+)=(?:"([^"]+)"|(.*?)|'([^']+)')(?:\s+|$)//
Thank You!
Best Regards,
Pavel Scherbinin
Thu Mar 29 04:53:15 2012
The RT System itself - Status changed from 'new' to 'open'
Sat May 05 07:20:03 2012
TINITA [...] cpan.org - Correspondence added
Thanks, I will have a look. The problem is that there is no real
specification for bbcode, and I try to support the most common things.
Fri May 11 19:05:55 2012
TINITA [...] cpan.org - Correspondence added
I implemented all three features/fixes, they will be in the next version.
thanks for your report!
tina
Sat May 12 12:26:57 2012
TINITA [...] cpan.org - Fixed in 0.13_004 added
Sun May 13 11:18:21 2012
TINITA [...] cpan.org - Correspondence added
I made the signle quoting optional.
see option "attribute_quote"
v0.14 is on the way to cpan now.
Sun Jul 13 05:19:51 2014
TINITA [...] cpan.org - Status changed from 'open' to 'resolved'