We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5ffaa56 commit 9949f00Copy full SHA for 9949f00
src/node/markdownToVue.ts
@@ -322,14 +322,16 @@ function injectPageDataCode(
322
code +
323
(hasDefaultExport
324
? ``
325
- : `\nexport default {name:'${data.relativePath}'}`) +
+ : `\nexport default {name:${JSON.stringify(data.relativePath)}}`) +
326
`</script>`
327
)
328
} else {
329
tags.unshift(
330
- `<script ${isUsingTS ? 'lang="ts"' : ''}>${code}\nexport default {name:'${
+ `<script ${
331
+ isUsingTS ? 'lang="ts"' : ''
332
+ }>${code}\nexport default {name:${JSON.stringify(
333
data.relativePath
- }'}</script>`
334
+ )}}</script>`
335
336
}
337
0 commit comments