Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions app/components/ReadmeTocDropdown.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script setup lang="ts">
import type { TocItem } from '#shared/types/readme'
import { onClickOutside, useEventListener } from '@vueuse/core'
import { decodeHtmlEntities } from '~/utils/formatters'

const props = defineProps<{
toc: TocItem[]
Expand Down Expand Up @@ -201,7 +202,7 @@ function handleKeydown(event: KeyboardEvent) {
@click="select()"
@mouseenter="highlightedIndex = getIndex(node.id)"
>
<span class="truncate">{{ node.text }}</span>
<span class="truncate">{{ decodeHtmlEntities(node.text) }}</span>
</NuxtLink>

<template v-for="child in node.children" :key="child.id">
Expand All @@ -219,7 +220,7 @@ function handleKeydown(event: KeyboardEvent) {
@click="select()"
@mouseenter="highlightedIndex = getIndex(child.id)"
>
<span class="truncate">{{ child.text }}</span>
<span class="truncate">{{ decodeHtmlEntities(child.text) }}</span>
</NuxtLink>

<NuxtLink
Expand All @@ -240,7 +241,7 @@ function handleKeydown(event: KeyboardEvent) {
@click="select()"
@mouseenter="highlightedIndex = getIndex(grandchild.id)"
>
<span class="truncate">{{ grandchild.text }}</span>
<span class="truncate">{{ decodeHtmlEntities(grandchild.text) }}</span>
</NuxtLink>
</template>
</template>
Expand Down
Loading