Update website
This commit is contained in:
parent
4413528994
commit
1d90fbf296
6865 changed files with 1091082 additions and 0 deletions
43
vendor/doctrine/rst-parser/lib/LaTeX/Directives/Title.php
vendored
Normal file
43
vendor/doctrine/rst-parser/lib/LaTeX/Directives/Title.php
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Doctrine\RST\LaTeX\Directives;
|
||||
|
||||
use Doctrine\RST\Directives\Directive;
|
||||
use Doctrine\RST\Nodes\Node;
|
||||
use Doctrine\RST\Parser;
|
||||
|
||||
/**
|
||||
* Add a meta title to the document
|
||||
*
|
||||
* .. title:: Page title
|
||||
*/
|
||||
final class Title extends Directive
|
||||
{
|
||||
public function getName(): string
|
||||
{
|
||||
return 'title';
|
||||
}
|
||||
|
||||
/** @param string[] $options */
|
||||
public function process(
|
||||
Parser $parser,
|
||||
?Node $node,
|
||||
string $variable,
|
||||
string $data,
|
||||
array $options
|
||||
): void {
|
||||
$document = $parser->getDocument();
|
||||
|
||||
$document->addHeaderNode(
|
||||
$parser->getNodeFactory()->createRawNode('\title{' . $data . '}')
|
||||
);
|
||||
|
||||
if ($node === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
$document->addNode($node);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue