1
0
mirror of https://github.com/themsaid/ibis.git synced 2025-01-17 13:38:33 +01:00

Allow Commonmark to be extended.

This commit is contained in:
Aaron Francis 2021-07-30 17:41:26 -05:00
parent 92a26b5757
commit c8f4fbebc1

View File

@ -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))