Skip to content

Commit 12aef72

Browse files
committed
fix: vfile extension format
1 parent e048a55 commit 12aef72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/content/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export async function createParser(collection: ResolvedCollection, nuxt?: Nuxt)
132132
return async function parse(file: ContentFile) {
133133
if (file.path) {
134134
file.dirname = file.dirname ?? dirname(file.path)
135-
file.extension = file.extension ?? file.path.split('.').pop()
135+
file.extension = file.extension ?? file.path.includes('.') ? '.' + file.path.split('.').pop() : undefined
136136
}
137137
const beforeParseCtx: FileBeforeParseHook = { file, collection, parserOptions }
138138
// @ts-expect-error runtime type

0 commit comments

Comments
 (0)