The AUBBC looks slightly better at the first look, I ain't gonna waste any more time.
I have now tested it to include it in my Parse::BBCode compare.html.
It is fast (almost as fast as HTML::BBReverse), but unfortunately like the latter it creates invalid HTML with unbalanced tags:
perl -Ilib -wle'
use AUBBC;
my $p = AUBBC->new;
my $bbcode = "[i] italic [b]bold[/b] end";
my $html = $p->do_all_ubbc($bbcode);
print $html;
'
<i> italic <b>bold</b> end
So it's basically unusable in a web forum because it can break the output HTML. I didn't find something about unbalanced tags in the docs.
It allows block elements like div inside of elements like i or b.
These are the reasons why it is so fast because it replaces start and end tags independently.
The module does not have any tests.
Source code is IMHO not very readable. No, too small or inconsistent indenting, very long lines. But of course, source code is just a matter of taste...
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.