mirror of
https://github.com/themsaid/ibis.git
synced 2025-01-17 05:28:32 +01:00
Allow Commonmark to be extended.
This commit is contained in:
parent
92a26b5757
commit
c8f4fbebc1
@ -73,7 +73,7 @@ class BuildCommand extends Command
|
|||||||
$theme = $this->getTheme($currentPath, $this->themeName);
|
$theme = $this->getTheme($currentPath, $this->themeName);
|
||||||
|
|
||||||
$this->buildPdf(
|
$this->buildPdf(
|
||||||
$this->buildHtml($currentPath.'/content'),
|
$this->buildHtml($currentPath.'/content', $config),
|
||||||
$config,
|
$config,
|
||||||
$currentPath,
|
$currentPath,
|
||||||
$theme
|
$theme
|
||||||
@ -103,9 +103,10 @@ class BuildCommand extends Command
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $path
|
* @param string $path
|
||||||
|
* @param array $config
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected function buildHtml(string $path)
|
protected function buildHtml(string $path, array $config)
|
||||||
{
|
{
|
||||||
$this->output->writeln('<fg=yellow>==></> Parsing Markdown ...');
|
$this->output->writeln('<fg=yellow>==></> Parsing Markdown ...');
|
||||||
|
|
||||||
@ -116,6 +117,10 @@ class BuildCommand extends Command
|
|||||||
'html', 'php', 'js', 'bash', 'json'
|
'html', 'php', 'js', 'bash', 'json'
|
||||||
]));
|
]));
|
||||||
|
|
||||||
|
if (is_callable($config['configure_commonmark'])) {
|
||||||
|
call_user_func($config['configure_commonmark'], $environment);
|
||||||
|
}
|
||||||
|
|
||||||
$converter = new GithubFlavoredMarkdownConverter([], $environment);
|
$converter = new GithubFlavoredMarkdownConverter([], $environment);
|
||||||
|
|
||||||
return collect($this->disk->files($path))
|
return collect($this->disk->files($path))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user