Skip to content

Commit 8ab69b1

Browse files
committed
lint: fix
1 parent 4d96e73 commit 8ab69b1

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

src/app/src/components/content/ContentEditor.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
import { computed, type PropType, toRaw } from 'vue'
2+
import { computed, type PropType } from 'vue'
33
import { decompressTree } from '@nuxt/content/runtime'
44
import type { MarkdownRoot } from '@nuxt/content'
55
import { DraftStatus, type DatabasePageItem, type DraftItem } from '../../types'

src/module/src/runtime/utils/collection.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ export function normalizeDocument(document: DatabaseItem) {
166166
Reflect.deleteProperty(document, 'title')
167167
}
168168

169-
const extractedContentHeading = document.body
170-
? contentHeading(document.body as MinimarkTree)
169+
const extractedContentHeading = document.body
170+
? contentHeading(document.body as MinimarkTree)
171171
: { title: '', description: '' }
172172
if (extractedContentHeading.title === document.title) {
173173
Reflect.deleteProperty(document, 'title')
@@ -235,19 +235,19 @@ export function generateRecordDeletion(collection: CollectionInfo, id: string) {
235235
* Extract the title and description from the body
236236
*/
237237
export function contentHeading(body: MinimarkTree) {
238-
let title = "";
239-
let description = "";
240-
const children = body.value.filter((node) => node[0] !== "hr");
241-
if (children.length && children[0]?.[0] === "h1") {
238+
let title = ''
239+
let description = ''
240+
const children = body.value.filter(node => node[0] !== 'hr')
241+
if (children.length && children[0]?.[0] === 'h1') {
242242
const node = children.shift()!
243-
title = textContent(node);
243+
title = textContent(node)
244244
}
245-
if (children.length && children[0]?.[0] === "p") {
246-
const node = children.shift()!;
247-
description = textContent(node);
245+
if (children.length && children[0]?.[0] === 'p') {
246+
const node = children.shift()!
247+
description = textContent(node)
248248
}
249249
return {
250250
title,
251-
description
252-
};
253-
}
251+
description,
252+
}
253+
}

0 commit comments

Comments
 (0)