add newline before closing /share tag in case it is needed for markdown

This commit is contained in:
Mike Macgirvin 2024-01-14 16:59:46 +11:00
parent 88c8459b28
commit c31050437d
4 changed files with 6 additions and 8 deletions

View file

@ -252,7 +252,7 @@ class Share
$bb .= "\n\n" . '[map=' . $this->item['lat'] . ',' . $this->item['lon'] . ']' . "\n";
}
$bb .= "[/share]";
$bb .= "\n[/share]";
}
return $bb;

View file

@ -144,7 +144,7 @@ class Oep extends Controller
}
$o .= $x;
$o .= "[/share]";
$o .= "\n[/share]";
$o = bbcode($o);
$o = str_replace($x, bbcode($p[0]['body']), $o);
@ -235,7 +235,7 @@ class Oep extends Controller
}
$o .= $x;
$o .= "[/share]";
$o .= "\n[/share]";
$o = bbcode($o);
$o = str_replace($x, bbcode($p[0]['body']), $o);
@ -325,7 +325,7 @@ class Oep extends Controller
}
$o .= $x;
$o .= "[/share]";
$o .= "\n[/share]";
$o = bbcode($o);
$o = str_replace($x, bbcode($p[0]['body']), $o);
@ -407,7 +407,7 @@ class Oep extends Controller
$o .= '[b]' . $p[0]['title'] . '[/b]' . "\r\n";
}
$o .= $x;
$o .= "[/share]";
$o .= "\n[/share]";
$o = bbcode($o);
$o = str_replace($x, bbcode($p[0]['body']), $o);

View file

@ -1308,7 +1308,6 @@ function md_header($content)
function md_codeblock($content)
{
$language = !empty($content[3]) ? filter_var($content[3], FILTER_SANITIZE_STRING) : '';
$class = !empty($language) ? sprintf(' class="%s language-%s"', $language, $language) : '';
// Build one block so that we not render each paragraph separately.
@ -1319,7 +1318,6 @@ function md_codeblock($content)
function md_italic($content)
{
return '<em>' . $content[1] . $content[3] . '</em>';
}

View file

@ -2991,7 +2991,7 @@ function start_delivery_chain($channel, $item, $item_id, bool|array $parent, $gr
$arr['title'] = $item['title'];
}
$bb .= $item['body'];
$bb .= "[/share]";
$bb .= "\n[/share]";
$arr['body'] = $bb;