From c78ddeb5918379c0efea06881313ffcf28bae32a Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Thu, 5 Dec 2024 11:13:18 +0100 Subject: [PATCH] Inline local variable override --- .../resources/views/components/markdown-heading.blade.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/framework/resources/views/components/markdown-heading.blade.php b/packages/framework/resources/views/components/markdown-heading.blade.php index c107780bb95..ab694f90bdf 100644 --- a/packages/framework/resources/views/components/markdown-heading.blade.php +++ b/packages/framework/resources/views/components/markdown-heading.blade.php @@ -8,14 +8,12 @@ @php $tag = 'h' . $level; $id = $id ?? \Illuminate\Support\Str::slug($slot); +@endphp - $extraAttributes = array_merge($extraAttributes, [ +<{{ $tag }} {{ $attributes->merge(array_merge($extraAttributes, [ 'id' => $addPermalink ? $id : ($extraAttributes['id'] ?? null), 'class' => trim(($extraAttributes['class'] ?? '') . ($addPermalink ? ' group w-fit scroll-mt-2' : '')), - ]); -@endphp - -<{{ $tag }} {{ $attributes->merge($extraAttributes) }}> + ])) }}> {!! $slot !!} @if($addPermalink === true)