D* formatting updates [code/blockquote]

This commit is contained in:
Friendika 2011-10-24 21:29:57 -07:00
parent efe3365431
commit 318f179408

View file

@ -19,7 +19,7 @@ function diaspora2bb($s) {
function stripdcode_br_cb($s) {
return '[code]' . str_replace('<br />', '', $s[1]) . '[/code]';
return '[code]' . str_replace('<br />', "\n\t", $s[1]) . '[/code]';
}
@ -119,7 +119,7 @@ function bb2diaspora($Text,$preserve_nl = false) {
// $CodeLayout = '<code>$1</code>';
// Check for [code] text
$Text = preg_replace("/\[code\](.*?)\[\/code\]/is","```$1```", $Text);
$Text = preg_replace("/\[code\](.*?)\[\/code\]/is","\t$1\n", $Text);
@ -127,7 +127,7 @@ function bb2diaspora($Text,$preserve_nl = false) {
// Declare the format for [quote] layout
// $QuoteLayout = '<blockquote>$1</blockquote>';
// Check for [quote] text
// $Text = preg_replace("/\[quote\](.*?)\[\/quote\]/is","$QuoteLayout", $Text);
$Text = preg_replace("/\[quote\](.*?)\[\/quote\]/is",">$1\n\n", $Text);
// Images