diff options
author | Fabio Comuni <fabrix.xm@gmail.com> | 2011-09-15 10:39:41 +0200 |
---|---|---|
committer | Fabio Comuni <fabrix.xm@gmail.com> | 2011-09-15 10:39:41 +0200 |
commit | 019b735ec75989336826e5ad5db6377803ecb050 (patch) | |
tree | 15b642ec6e24d07d9d5c6009ec2ebf2a0b720742 /include/bb2diaspora.php | |
parent | 7e806429cca6ac39a9ef1bd1fd400d03e626389b (diff) | |
parent | d284f8017cefb79571fe51c4ae3f85b9b4e517c9 (diff) | |
download | volse-hubzilla-019b735ec75989336826e5ad5db6377803ecb050.tar.gz volse-hubzilla-019b735ec75989336826e5ad5db6377803ecb050.tar.bz2 volse-hubzilla-019b735ec75989336826e5ad5db6377803ecb050.zip |
Merge branch 'newui' of github.com:fabrixxm/friendika into newui
Diffstat (limited to 'include/bb2diaspora.php')
-rw-r--r-- | include/bb2diaspora.php | 5 |
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); |