for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/*
* This file is part of the league/commonmark package.
*
* (c) Colin O'Dell <[email protected]>
* Original code based on the CommonMark JS reference parser (https://bitly.com/commonmark-js)
* - (c) John MacFarlane
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace League\CommonMark\Node\Inline;
final class Text extends AbstractStringContainer
{
private bool $isDelimiter = false;
/**
* @param string $contents The text contents
* @param array<string, mixed> $data Arbitrary data
public function __construct(string $contents = '', array $data = [])
if (isset($data['delim'])) {
$this->isDelimiter = (bool) $data['delim'];
unset($data['delim']);
}
parent::__construct($contents, $data);
public function isDelimiter(): bool
return $this->isDelimiter;
public function setDelimiter(bool $isDelimiter): void
$this->isDelimiter = $isDelimiter;
public function append(string $literal): void
$this->literal .= $literal;