aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-11-08 15:38:06 -0800
committerFriendika <info@friendika.com>2011-11-08 15:38:06 -0800
commit02a1fdacd7fb32d40b30ea52c07c07c7c414ee76 (patch)
treef202abaa40e2990d44be55f96b9582d76a349f3e /include
parent6d507a840a1bcb8bd3591a808c7a8f29ca1eebd8 (diff)
downloadvolse-hubzilla-02a1fdacd7fb32d40b30ea52c07c07c7c414ee76.tar.gz
volse-hubzilla-02a1fdacd7fb32d40b30ea52c07c07c7c414ee76.tar.bz2
volse-hubzilla-02a1fdacd7fb32d40b30ea52c07c07c7c414ee76.zip
strip duplicate code blocks bb2d*
Diffstat (limited to 'include')
-rw-r--r--include/bb2diaspora.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php
index 2331865ae..262b61ac0 100644
--- a/include/bb2diaspora.php
+++ b/include/bb2diaspora.php
@@ -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);