Skip to content

Commit 01c5100

Browse files
authored
feat: support description elements in readmes (#2849)
1 parent 030a0ce commit 01c5100

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

app/components/Readme.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,14 @@ function handleClick(event: MouseEvent) {
283283
font-style: italic;
284284
}
285285
286+
.readme :deep(dt) {
287+
margin-block-start: 0.5rem;
288+
}
289+
290+
.readme :deep(dd) {
291+
padding-inline-start: 1.5rem;
292+
}
293+
286294
/* GitHub-style callouts/alerts */
287295
.readme :deep(blockquote[data-callout]) {
288296
border-inline-start-width: 3px;

server/utils/readme.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,9 @@ export const ALLOWED_TAGS = [
180180
'kbd',
181181
'mark',
182182
'button',
183+
'dl',
184+
'dt',
185+
'dd',
183186
]
184187

185188
export const ALLOWED_ATTR: Record<string, string[]> = {

0 commit comments

Comments
 (0)