mirror of
https://github.com/YGGverse/gemtext-php.git
synced 2026-04-01 10:15:33 +00:00
make plain text trim disabled by default
This commit is contained in:
parent
652b605739
commit
4222e8a286
1 changed files with 8 additions and 5 deletions
|
|
@ -9,20 +9,23 @@ class Text
|
|||
private string $_data;
|
||||
|
||||
public function __construct(
|
||||
string $data
|
||||
string $data,
|
||||
bool $trim = false
|
||||
) {
|
||||
$this->setData(
|
||||
$data
|
||||
$data,
|
||||
$trim
|
||||
);
|
||||
}
|
||||
|
||||
public function setData(
|
||||
string $data
|
||||
string $data,
|
||||
bool $trim = false
|
||||
): void
|
||||
{
|
||||
$this->_data = trim(
|
||||
$this->_data = $trim ? trim(
|
||||
$data
|
||||
);
|
||||
) : $data;
|
||||
}
|
||||
|
||||
public function getData(): string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue