strip duplicate code blocks bb2d*

This commit is contained in:
Friendika 2011-11-08 15:38:06 -08:00
parent 6d507a840a
commit 02a1fdacd7
2 changed files with 109 additions and 68 deletions

View file

@ -149,13 +149,11 @@ function bb2diaspora($Text,$preserve_nl = false) {
// Check for font change text
// $Text = preg_replace("(\[font=(.*?)\](.*?)\[\/font\])","<span style=\"font-family: $1;\">$2</span>",$Text);
// Declare the format for [code] layout
$Text = preg_replace_callback("/\[code\](.*?)\[\/code\]/is",'stripdcode_br_cb',$Text);
$Text = preg_replace_callback("/\[code\](.*?)\[\/code\]/is",'stripdcode_br_cb',$Text);
// $CodeLayout = '<code>$1</code>';
// Check for [code] text
$Text = preg_replace("/\[code\](.*?)\[\/code\]/is","\t$1\n", $Text);
$Text = preg_replace("/(\[code\])+(.*?)(\[\/code\])+/is","\t$2\n", $Text);