with no more wordwrap, there's no need for unwrap
This commit is contained in:
parent
d11dad3055
commit
c887580074
1 changed files with 0 additions and 8 deletions
|
@ -27,10 +27,6 @@
|
|||
|
||||
class BBCode extends FormatterExtension {
|
||||
public function format(/*string*/ $text) {
|
||||
$text = preg_replace_callback("/(\[img\]https?:\/\/.*?\[\/img\])/s", array($this, "unwrap"), $text);
|
||||
$text = preg_replace_callback("/(\[url=(?:https?|ftp|irc|mailto):\/\/.*?\])/s", array($this, "unwrap"), $text);
|
||||
$text = preg_replace_callback("/(\[url\](?:https?|ftp|irc|mailto):\/\/.*?\[\/url\])/s", array($this, "unwrap"), $text);
|
||||
|
||||
$text = $this->extract_code($text);
|
||||
$text = preg_replace("/\[b\](.*?)\[\/b\]/s", "<b>\\1</b>", $text);
|
||||
$text = preg_replace("/\[i\](.*?)\[\/i\]/s", "<i>\\1</i>", $text);
|
||||
|
@ -70,10 +66,6 @@ class BBCode extends FormatterExtension {
|
|||
return $text;
|
||||
}
|
||||
|
||||
private function unwrap($matches) {
|
||||
return str_replace(' ', '', $matches[1]);
|
||||
}
|
||||
|
||||
public function strip(/*string*/ $text) {
|
||||
$text = preg_replace("/\[b\](.*?)\[\/b\]/s", "\\1", $text);
|
||||
$text = preg_replace("/\[i\](.*?)\[\/i\]/s", "\\1", $text);
|
||||
|
|
Reference in a new issue