mirror of
https://github.com/friendica/friendica
synced 2025-04-23 21:10:12 +00:00
Changes in the bbcode to markdown converter to make it more compatible with Diaspora
This commit is contained in:
parent
8d7d46ae7a
commit
4e9086f9b0
3 changed files with 22 additions and 1 deletions
|
@ -115,6 +115,10 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
|
|||
|
||||
$a = get_app();
|
||||
|
||||
// Move all spaces out of the tags
|
||||
$Text = preg_replace("/\[(\w*)\](\s*)/ism", '$2[$1]', $Text);
|
||||
$Text = preg_replace("/(\s*)\[\/(\w*)\]/ism", '[/$2]$1', $Text);
|
||||
|
||||
// Hide all [noparse] contained bbtags by spacefying them
|
||||
// POSSIBLE BUG --> Will the 'preg' functions crash if there's an embedded image?
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue