mirror of
https://github.com/friendica/friendica
synced 2025-04-27 14:30:11 +00:00
Improve quite generation
This commit is contained in:
parent
34c3f189fc
commit
8e1af9277a
4 changed files with 51 additions and 12 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue