diff --git a/src/Extensions/Link/LinkRenderer.php b/src/Extensions/Link/LinkRenderer.php index 9f2e469..0dacc3b 100644 --- a/src/Extensions/Link/LinkRenderer.php +++ b/src/Extensions/Link/LinkRenderer.php @@ -2,6 +2,7 @@ namespace ARKEcosystem\CommonMark\Extensions\Link; +use Illuminate\Support\Arr; use Illuminate\View\ComponentAttributeBag; use League\CommonMark\ElementRendererInterface; use League\CommonMark\HtmlElement; @@ -47,7 +48,7 @@ public function render(AbstractInline $inline, ElementRendererInterface $htmlRen } if ($this->isInternalLink($attrs['href'])) { - $attrs = array_merge($attrs, config('markdown.link_attributes', [])); + $attrs = array_merge(Arr::only($attrs, ['href', 'id', 'class', 'name', 'title']), config('markdown.link_attributes', [])); return new HtmlElement('a', $attrs, $htmlRenderer->renderInlines($inline->children())); }