From b52651c5582d1445248983ee57bf0908ebddaf4f Mon Sep 17 00:00:00 2001 From: NaGeL Date: Tue, 17 Jan 2012 22:45:24 +0100 Subject: [PATCH] added [align=(left|center|right)] BBcode which aligns text naturally. --- ext/bbcode/main.php | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/bbcode/main.php b/ext/bbcode/main.php index bddda8c5..328d9dba 100644 --- a/ext/bbcode/main.php +++ b/ext/bbcode/main.php @@ -63,6 +63,7 @@ class BBCode extends FormatterExtension { $text = preg_replace("/\[li\](.*?)\[\/li\]/s", "
  • \\1
  • ", $text); $text = preg_replace("#\[\*\]#s", "
  • ", $text); $text = preg_replace("#
    <(li|ul|ol|/ul|/ol)>#s", "<\\1>", $text); + $text = preg_replace("#\[align=(left|center|right)\](.*?)\[\/align\]#s", "
    \\2
    ", $text); $text = $this->filter_spoiler($text); $text = $this->insert_code($text); return $text;