aboutsummaryrefslogtreecommitdiffstats
path: root/include/bb2diaspora.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-11-08 16:54:32 -0800
committerFriendika <info@friendika.com>2011-11-08 16:54:32 -0800
commit20ca93191fda9f25f387e354a8ac4edd9582ded5 (patch)
treebc3eca4d41bdf611041fb8a953ebdeda58c5634b /include/bb2diaspora.php
parent02a1fdacd7fb32d40b30ea52c07c07c7c414ee76 (diff)
downloadvolse-hubzilla-20ca93191fda9f25f387e354a8ac4edd9582ded5.tar.gz
volse-hubzilla-20ca93191fda9f25f387e354a8ac4edd9582ded5.tar.bz2
volse-hubzilla-20ca93191fda9f25f387e354a8ac4edd9582ded5.zip
cleanup and loose ends
Diffstat (limited to 'include/bb2diaspora.php')
-rw-r--r--include/bb2diaspora.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php
index 262b61ac0..6b0589c43 100644
--- a/include/bb2diaspora.php
+++ b/include/bb2diaspora.php
@@ -6,6 +6,11 @@ require_once('include/event.php');
require_once('library/markdown.php');
require_once('include/html2bbcode.php');
+// we don't want to support a bbcode specific markdown interpreter
+// and the markdown library we have is pretty good, but provides HTML output.
+// So we'll use that to convert to HTML, then convert the HTML back to bbcode,
+// and then clean up a few Diaspora specific constructs.
+
function diaspora2bb($s) {
$s = preg_replace('/\@\{(.+?)\; (.+?)\@(.+?)\}/','@[url=https://$3/u/$2]$1[/url]',$s);
@@ -57,8 +62,6 @@ function stripdcode_br_cb($s) {
}
- // BBcode 2 HTML was written by WAY2WEB.net
- // extended to work with Mistpark/Friendika - Mike Macgirvin
function bb2diaspora($Text,$preserve_nl = false) {
@@ -95,7 +98,6 @@ function bb2diaspora($Text,$preserve_nl = false) {
$Text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '[$2]($1)', $Text);
$Text = preg_replace("/\[img\](.*?)\[\/img\]/", '![' . t('image/photo') . '](' . '$1' . ')', $Text);
-// $Text = preg_replace("/\[img\](.*?)\[\/img\]/", t('image/photo'), $Text);
// Perform MAIL Search
$Text = preg_replace("(\[mail\]([$MAILSearchString]*)\[/mail\])", '[$1](mailto:$1)', $Text);