Files
kulakpos_web/vendor/knuckleswtf/scribe/src/Tools/BladeMarkdownEngine.php
eko54r 1228c52538
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 3m36s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
Build, Push and Deploy / deploy-staging (push) Successful in 42s
Build, Push and Deploy / deploy-production (push) Has been skipped
update after stop build
2026-04-18 16:10:57 +07:00

31 lines
734 B
PHP

<?php
namespace Knuckles\Scribe\Tools;
use Illuminate\Filesystem\Filesystem;
use Illuminate\View\Compilers\CompilerInterface;
use Illuminate\View\Engines\CompilerEngine;
class BladeMarkdownEngine extends CompilerEngine
{
private \Parsedown $markdown;
public function __construct(CompilerInterface $compiler, ?Filesystem $files = null)
{
parent::__construct($compiler, $files ?: new Filesystem);
$this->markdown = \Parsedown::instance();
}
/**
* Get the evaluated contents of the view.
*
* @param mixed $path
*/
public function get($path, array $data = [])
{
$contents = parent::get($path, $data);
return $this->markdown->text($contents);
}
}