aboutsummaryrefslogtreecommitdiffstats
path: root/include/bb2diaspora.php
diff options
context:
space:
mode:
authorfabrixxm <fabrix.xm@gmail.com>2011-09-08 20:15:27 +0200
committerfabrixxm <fabrix.xm@gmail.com>2011-09-08 20:15:27 +0200
commitd284f8017cefb79571fe51c4ae3f85b9b4e517c9 (patch)
treefbf1902147b237649048e2ab6ac8a84ffe0bf838 /include/bb2diaspora.php
parent2fabf8d2188516a36589487bfa2ca01dea0c5ca2 (diff)
parent68c23f6c86e2f2e24548b179f00b5bcd5ab8ba87 (diff)
downloadvolse-hubzilla-d284f8017cefb79571fe51c4ae3f85b9b4e517c9.tar.gz
volse-hubzilla-d284f8017cefb79571fe51c4ae3f85b9b4e517c9.tar.bz2
volse-hubzilla-d284f8017cefb79571fe51c4ae3f85b9b4e517c9.zip
Merge remote-tracking branch 'friendika/master' into newui
Diffstat (limited to 'include/bb2diaspora.php')
-rw-r--r--include/bb2diaspora.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php
index ca0c961b3..591aaf7fa 100644
--- a/include/bb2diaspora.php
+++ b/include/bb2diaspora.php
@@ -8,6 +8,10 @@ require_once('include/event.php');
function diaspora2bb($s) {
+ // bug #127
+ $s = preg_replace('/\[(.+?)\]\((.+?)[^\\\]_(.+?)\)/','[$1]($2\\_$3)',$s);
+
+
$s = str_replace(array('\\**','\\__','\\*','\\_'), array('-^doublestar^-','-^doublescore-^','-^star^-','-^score^-'),$s);
$s = preg_replace("/\*\*\*(.+?)\*\*\*/", '[b][i]$1[/i][/b]', $s);
$s = preg_replace("/\_\_\_(.+?)\_\_\_/", '[b][i]$1[/i][/b]', $s);
@@ -15,6 +19,7 @@ function diaspora2bb($s) {
$s = preg_replace("/\_\_(.+?)\_\_/", '[b]$1[/b]', $s);
$s = preg_replace("/\*(.+?)\*/", '[i]$1[/i]', $s);
$s = preg_replace("/\_(.+?)\_/", '[i]$1[/i]', $s);
+
$s = str_replace(array('-^doublestar^-','-^doublescore-^','-^star^-','-^score^-'), array('**','__','*','_'), $s);
$s = preg_replace('/\!\[(.+?)\]\((.+?)\)/','[img]$2[/img]',$s);
$s = preg_replace('/\[(.+?)\]\((.+?)\)/','[url=$2]$1[/url]',$s);