Improve quite generation

This commit is contained in:
Michael 2022-10-15 13:00:52 +00:00
parent 34c3f189fc
commit 8e1af9277a
4 changed files with 51 additions and 12 deletions

View file

@ -1085,6 +1085,22 @@ class BBCode
);
}
/**
* Remove the share block
*
* @param string $body
* @return string
*/
public static function removeSharedData(string $body): string
{
return BBCode::convertShare(
$body,
function (array $attributes) {
return '';
}
);
}
/**
* This function converts a [share] block to text according to a provided callback function whose signature is:
*
@ -1134,7 +1150,7 @@ class BBCode
);
DI::profiler()->stopRecording();
return $return;
return trim($return);
}
/**