From 318f17940873bb6857dcaaca362194676c1f5dc7 Mon Sep 17 00:00:00 2001 From: Friendika Date: Mon, 24 Oct 2011 21:29:57 -0700 Subject: [PATCH] D* formatting updates [code/blockquote] --- include/bb2diaspora.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php index d6c7994ba..e2711755b 100644 --- a/include/bb2diaspora.php +++ b/include/bb2diaspora.php @@ -19,7 +19,7 @@ function diaspora2bb($s) { function stripdcode_br_cb($s) { - return '[code]' . str_replace('
', '', $s[1]) . '[/code]'; + return '[code]' . str_replace('
', "\n\t", $s[1]) . '[/code]'; } @@ -117,17 +117,17 @@ function bb2diaspora($Text,$preserve_nl = false) { $Text = preg_replace_callback("/\[code\](.*?)\[\/code\]/is",'stripdcode_br_cb',$Text); -// $CodeLayout = '$1'; + // $CodeLayout = '$1'; // Check for [code] text - $Text = preg_replace("/\[code\](.*?)\[\/code\]/is","```$1```", $Text); + $Text = preg_replace("/\[code\](.*?)\[\/code\]/is","\t$1\n", $Text); // Declare the format for [quote] layout -// $QuoteLayout = '
$1
'; + // $QuoteLayout = '
$1
'; // Check for [quote] text -// $Text = preg_replace("/\[quote\](.*?)\[\/quote\]/is","$QuoteLayout", $Text); + $Text = preg_replace("/\[quote\](.*?)\[\/quote\]/is",">$1\n\n", $Text); // Images