added [align=(left|center|right)] BBcode which aligns text naturally.
This commit is contained in:
parent
46776bf853
commit
3c6217fa4c
1 changed files with 1 additions and 0 deletions
|
@ -63,6 +63,7 @@ class BBCode extends FormatterExtension {
|
|||
$text = preg_replace("/\[li\](.*?)\[\/li\]/s", "<li>\\1</li>", $text);
|
||||
$text = preg_replace("#\[\*\]#s", "<li>", $text);
|
||||
$text = preg_replace("#<br><(li|ul|ol|/ul|/ol)>#s", "<\\1>", $text);
|
||||
$text = preg_replace("#\[align=(left|center|right)\](.*?)\[\/align\]#s", "<div style='text-align:\\1;'>\\2</div>", $text);
|
||||
$text = $this->filter_spoiler($text);
|
||||
$text = $this->insert_code($text);
|
||||
return $text;
|
||||
|
|
Reference in a new issue