mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
define wrap storage
This commit is contained in:
parent
ba7a56ca7e
commit
3186ac6846
2 changed files with 16 additions and 10 deletions
|
|
@ -315,15 +315,20 @@ class Gemtext extends Markup
|
|||
}
|
||||
|
||||
private function _wrap(
|
||||
string $value
|
||||
string $source
|
||||
): string
|
||||
{
|
||||
return wordwrap(
|
||||
$value,
|
||||
$this::WRAP,
|
||||
PHP_EOL,
|
||||
false
|
||||
);
|
||||
if ($wrap = $this->_wrap ? $this->_wrap : $this::WRAP)
|
||||
{
|
||||
return wordwrap(
|
||||
$source,
|
||||
$wrap,
|
||||
PHP_EOL,
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
throw new Exception;
|
||||
}
|
||||
|
||||
private function _url(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue