The problem with span is that it does not allow text-align. So [center] and the like does not work anymore. So I have changed some lines in the .inc filter like this :

    '#\[align=(.*?)(?::\w+)?\](.*?)\[/align(?::\w+)?\]#si'   => '<span c lass="bb-block" style="text-align:\\1">\\2</span>',
    '#\[center(?::\w+)?\](.*?)\[/center(?::\w+)?\]#si'       => '<span c lass="bb-block" style="text-align:center">\\1</span>',
    '#\[left(?::\w+)?\](.*?)\[/left(?::\w+)?\]#si'           => '<span c lass="bb-block" style="text-align:left">\\1</span>',
    '#\[right(?::\w+)?\](.*?)\[/right(?::\w+)?\]#si'         => '<span c lass="bb-block" style="text-align:right">\\1</span>',

(of course remove the space between the "c" and the "lass".

This way, those tags will have a c lass, and then, in the style.css file just add display:block to this c lass and it works.

Comments

naudefj’s picture

Priority: Critical » Normal

Shouldn't we rather change them back from SPAN to DIV?

Julien PHAM’s picture

You can but beware a (div) cannot be in a (p), so you have to change the code accordingly, as you did with (ol) or (ul), to avoid having this issue.

naudefj’s picture

Assigned: Julien PHAM » naudefj
Status: Needs review » Fixed

Fixed in CVS.

Anonymous’s picture

Status: Fixed » Closed (fixed)