diaspora formatting improvements (getting too many xx-large posts)
This commit is contained in:
parent
ee89ff5124
commit
8db34ac826
@ -116,6 +116,7 @@ function diaspora_mention_callback($matches) {
|
||||
function diaspora2bb($s,$use_zrl = false) {
|
||||
|
||||
|
||||
$s = str_replace("
","\r",$s);
|
||||
$s = str_replace("
\n>","",$s);
|
||||
|
||||
$s = html_entity_decode($s,ENT_COMPAT,'UTF-8');
|
||||
@ -123,11 +124,11 @@ function diaspora2bb($s,$use_zrl = false) {
|
||||
// Too many new lines. So deactivated the following line
|
||||
// $s = str_replace("\r","\n",$s);
|
||||
// Simply remove cr.
|
||||
$s = str_replace("\r","",$s);
|
||||
// $s = str_replace("\r","",$s);
|
||||
|
||||
// <br/> is invalid. Replace it with the valid expression
|
||||
$s = str_replace("<br/>","<br />",$s);
|
||||
$s = str_replace("\n","<br />",$s);
|
||||
// $s = str_replace("<br/>","<br />",$s);
|
||||
// $s = str_replace("\n","<br />",$s);
|
||||
|
||||
|
||||
// $s = preg_replace('/\@\{(.+?)\; (.+?)\@(.+?)\}/','@[url=https://$3/u/$2]$1[/url]',$s);
|
||||
@ -147,6 +148,8 @@ function diaspora2bb($s,$use_zrl = false) {
|
||||
|
||||
$s = Markdown($s);
|
||||
|
||||
$s = str_replace("\r","",$s);
|
||||
|
||||
$s = str_replace('#','#',$s);
|
||||
// we seem to have double linebreaks
|
||||
// $s = str_replace("\n",'<br />',$s);
|
||||
@ -175,7 +178,6 @@ function diaspora2bb($s,$use_zrl = false) {
|
||||
// remove duplicate adjacent code tags
|
||||
$s = preg_replace("/(\[code\])+(.*?)(\[\/code\])+/ism","[code]$2[/code]", $s);
|
||||
|
||||
|
||||
$s = preg_replace_callback('/\[share(.*?)\]/ism','share_unshield',$s);
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user