diff --git a/packages/framework/src/Markdown/Processing/DynamicMarkdownLinkProcessor.php b/packages/framework/src/Markdown/Processing/DynamicMarkdownLinkProcessor.php index fc9e6b45330..7dc220855e0 100644 --- a/packages/framework/src/Markdown/Processing/DynamicMarkdownLinkProcessor.php +++ b/packages/framework/src/Markdown/Processing/DynamicMarkdownLinkProcessor.php @@ -6,7 +6,6 @@ use Hyde\Hyde; use Illuminate\Support\Str; -use Hyde\Support\Models\Route; use Hyde\Support\Filesystem\MediaFile; use Hyde\Markdown\Contracts\MarkdownPostProcessorContract; @@ -17,35 +16,27 @@ class DynamicMarkdownLinkProcessor implements MarkdownPostProcessorContract public static function postprocess(string $html): string { - $html = static::processMap(static::routeMap(), $html, 'a', 'href'); - $html = static::processMap(static::assetMap(), $html, 'img', 'src'); + foreach (static::routeMap() as $sourcePath => $route) { + $patterns = [ + sprintf('getLink()), $html); + } - /** - * @param array $map - */ - protected static function processMap(array $map, string $html, string $tag, string $attribute): string - { - foreach ($map as $sourcePath => $item) { + foreach (static::assetMap() as $sourcePath => $mediaFile) { $patterns = [ - sprintf('<%s %s="%s"', $tag, $attribute, $sourcePath), - sprintf('<%s %s="/%s"', $tag, $attribute, $sourcePath), + sprintf('getLink(); - } - /** @return array */ protected static function routeMap(): array {