gl-website-deployer/vendor/doctrine/rst-parser/lib/Directives/Replace.php
2024-11-19 08:02:04 +01:00

32 lines
588 B
PHP

<?php
declare(strict_types=1);
namespace Doctrine\RST\Directives;
use Doctrine\RST\Nodes\Node;
use Doctrine\RST\Parser;
/**
* The Replace directive will set the variables for the spans
*
* .. |test| replace:: The Test String!
*/
final class Replace extends Directive
{
public function getName(): string
{
return 'replace';
}
/** @param string[] $options */
public function processNode(
Parser $parser,
string $variable,
string $data,
array $options
): ?Node {
return $parser->createSpanNode($data);
}
}