helios-ag / FMBbCodeBundle

:capital_abcd: BBCode bundle for Symfony projects
Other
57 stars 35 forks source link

The list aren't working. #71

Closed PierreAdam closed 9 years ago

PierreAdam commented 11 years ago

Hello,

I tried to use that with the filter list

[list]
[*] Element 1
[*] Element 2
[/list]
helios-ag commented 11 years ago

look at list example in decoda lib https://github.com/milesj/Decoda/blob/master/examples/list.php Decoda doesn't support star bbcode [*], instead use [li][/li]

PierreAdam commented 11 years ago

Hum ok thanks

general03 commented 10 years ago

According https://github.com/milesj/decoda/commit/729dc63b63ca2fa949ec49645b670806eebae542 the support of [] was added 7 months ago But I can't display my items with [], it works only with [li][/li]

general03 commented 10 years ago

With the decoda version 6.4.3 all is right

renskiy commented 9 years ago

Doesn't work again (using [*]) FMBbCodeBundle: 6.2.1 decoda: 6.6.0

helios-ag commented 9 years ago

Just rechecked, works fine with 6.6.0

{{'[list][*] Element 1[/*][*] Element 2 [/*][/list]'|bbcode_filter('my_default_filter')}}
renskiy commented 9 years ago

I mean format mentioned by PierreAdam (without ending tags [/*])

renskiy commented 9 years ago

if it will be helpful, I wrote regexp which replaces all [*] occurrences by [li][/li]:

preg_replace(
    '#\[\*\](.*?)(?:\[/\*\])?\s*(?=\[\*\]|\[/list\])#sim',
    '[li]$1[/li]'
    $content
);
alquerci commented 9 years ago

That feature was added since Decoda 6.2.0 and you can look at this test case who it works.

helios-ag commented 9 years ago

I confirm this bug. This behavior due to uppercase'd check List filter definition in decoda https://github.com/milesj/decoda/blob/master/src/Decoda/Decoda.php#L1295

helios-ag commented 9 years ago

Fixed in #103