Skip to content

Commit b4c58ab

Browse files
committed
chore: lint
1 parent 5095cf9 commit b4c58ab

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

docs/custom/config-parser.md

+3-7
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,6 @@ export default definePreparserSetup(() => {
181181

182182
And that's it.
183183

184-
185-
186184
### Use case 3: using custom frontmatter to transform note
187185

188186
Imagine a case where you want to replace the slides default notes with custom notes.
@@ -210,9 +208,8 @@ Here we used an underscore in `_note` to avoid possible conflicts with existing
210208
To handle this `_note: ...` syntax in the frontmatter, create a `./setup/preparser.ts` file with the following content:
211209

212210
```ts twoslash
211+
import fs, { promises as fsp } from 'node:fs'
213212
import { definePreparserSetup } from '@slidev/types'
214-
import fs from 'fs'
215-
import { promises as fsp } from 'fs'
216213

217214
export default definePreparserSetup(() => {
218215
return [
@@ -222,7 +219,8 @@ export default definePreparserSetup(() => {
222219
try {
223220
const newNote = await fsp.readFile(frontmatter._note, 'utf8')
224221
return newNote
225-
} catch (err) {
222+
}
223+
catch (err) {
226224
}
227225
}
228226

@@ -232,5 +230,3 @@ export default definePreparserSetup(() => {
232230
]
233231
})
234232
```
235-
236-
And that's it.

0 commit comments

Comments
 (0)