Skip to content

Commit 95e3699

Browse files
committed
added heading links for changelog markdown
1 parent 9c36c60 commit 95e3699

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/components/Readme.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ function handleClick(event: MouseEvent) {
150150
@apply inline i-lucide:external-link rtl-flip ms-1 opacity-50;
151151
}
152152
153-
.readme :deep(a[href^='#']::after) {
153+
.readme :deep(a[href^='#']:not(.content-none)::after) {
154154
/* I don't know what kind of sorcery this is, but it ensures this icon can't wrap to a new line on its own. */
155155
content: '__';
156156
@apply inline i-lucide:link rtl-flip ms-1 opacity-0;

server/utils/changelog/markdown.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export async function changelogRenderer() {
9696
toc.push({ text: plainText, id, depth })
9797
}
9898

99-
return `<h${semanticLevel} id="${id}" data-level="${depth}">${text}</h${semanticLevel}>\n`
99+
return `<h${semanticLevel} id="${id}" data-level="${depth}">${text} <a class="content-none" href="#${id}"><span class="i-lucide:link size-[1em]" aria-hidden="true"></span></a></h${semanticLevel}>\n`
100100
}
101101

102102
return {

0 commit comments

Comments
 (0)