aboutsummaryrefslogtreecommitdiffstats
path: root/include/bb2diaspora.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-10-24 21:29:57 -0700
committerFriendika <info@friendika.com>2011-10-24 21:29:57 -0700
commit318f17940873bb6857dcaaca362194676c1f5dc7 (patch)
treea4c6407b08ee7d3e4dfc58803cac857603c97704 /include/bb2diaspora.php
parentefe3365431f4641c27f01e67d63832db261ffb82 (diff)
downloadvolse-hubzilla-318f17940873bb6857dcaaca362194676c1f5dc7.tar.gz
volse-hubzilla-318f17940873bb6857dcaaca362194676c1f5dc7.tar.bz2
volse-hubzilla-318f17940873bb6857dcaaca362194676c1f5dc7.zip
D* formatting updates [code/blockquote]
Diffstat (limited to 'include/bb2diaspora.php')
-rw-r--r--include/bb2diaspora.php10
1 files 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('<br />', '', $s[1]) . '[/code]';
+ return '[code]' . str_replace('<br />', "\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 = '<code>$1</code>';
+ // $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);
// Declare the format for [quote] layout
-// $QuoteLayout = '<blockquote>$1</blockquote>';
+ // $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