mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-07 04:24:44 +02:00
[Gab] feat: add new bridge GabBridge (#2920)
This commit is contained in:
parent
5b5f3b4254
commit
0a060b2ad6
4 changed files with 86 additions and 1 deletions
|
@ -50,6 +50,15 @@ function raw(string $s): string
|
|||
return $s;
|
||||
}
|
||||
|
||||
function truncate(string $s, int $length = 150, $marker = '...'): string
|
||||
{
|
||||
$s = trim($s);
|
||||
if (mb_strlen($s) <= $length) {
|
||||
return $s;
|
||||
}
|
||||
return mb_substr($s, 0, $length) . $marker;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes unwanted tags from a given HTML text.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue