Skip to content

Commit 6cbe6e8

Browse files
committed
changed how content-none is applied for changelog.md
1 parent 013654c commit 6cbe6e8

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

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^='#']:not(.content-none)::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
@@ -107,7 +107,7 @@ export async function changelogRenderer() {
107107
toc.push({ text: plainText, id, depth })
108108
}
109109

110-
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`
110+
return `<h${semanticLevel} id="${id}" data-level="${depth}">${text} <a content-none href="#${id}"><span class="i-lucide:link size-[1em]" aria-hidden="true"></span></a></h${semanticLevel}>\n`
111111
}
112112

113113
return {

server/utils/readme.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ export const ALLOWED_TAGS = [
174174

175175
export const ALLOWED_ATTR: Record<string, string[]> = {
176176
'*': ['id'], // Allow id on all tags
177-
'a': ['href', 'title', 'target', 'rel', 'class'],
177+
'a': ['href', 'title', 'target', 'rel', 'content-none'],
178178
'img': ['src', 'alt', 'title', 'width', 'height', 'align'],
179179
'source': ['src', 'srcset', 'type', 'media'],
180180
'button': ['class', 'title', 'type', 'aria-label', 'data-copy'],

0 commit comments

Comments
 (0)