Skip to content

Commit 607c84c

Browse files
authored
fix: render breadcrumbs last element as markdown (#1564)
1 parent b07d2e4 commit 607c84c

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

_components/Breadcrumbs.tsx

+8-4
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default function (props: {
3737
url: string;
3838
sectionTitle: string;
3939
sectionHref: string;
40-
}) {
40+
}, helpers: Lume.Helpers) {
4141
const crumbs: SidebarItem[] = [];
4242

4343
for (const section of props.sidebar) {
@@ -99,9 +99,13 @@ export default function (props: {
9999
</a>
100100
)
101101
: (
102-
<span itemprop="name" class="block px-3 py-1.5 text-sm">
103-
{crumb.title}
104-
</span>
102+
<span
103+
itemprop="name"
104+
class="block px-3 py-1.5 text-sm"
105+
dangerouslySetInnerHTML={{
106+
__html: helpers.md(crumb.title, true),
107+
}}
108+
/>
105109
)}
106110
<meta itemprop="position" content={String(i + 2)} />
107111
</li>

0 commit comments

Comments
 (0)