Skip to content

Commit 7097675

Browse files
[autofix.ci] apply automated fixes
1 parent 9f57832 commit 7097675

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

packages/client/setup/code-runners.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ function runJavaScript(code: string): CodeRunnerOutputs {
131131
// JSON.stringify omits any keys with a value of undefined. To get around this, we replace undefined with the text __undefined__ and then do a global replace using regex back to keyword undefined
132132
textRep
133133
= prefix
134-
+ JSON.stringify(arg, (_, value) => (value === undefined ? '__undefined__' : value), 2).replace(
135-
/"__undefined__"/g,
136-
'undefined',
137-
)
134+
+ JSON.stringify(arg, (_, value) => (value === undefined ? '__undefined__' : value), 2).replace(
135+
/"__undefined__"/g,
136+
'undefined',
137+
)
138138

139139
textRep = String(textRep)
140140
}

packages/slidev/node/resolver.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ export async function getRoots(entry?: string): Promise<RootsInfo> {
231231
const userRoot = dirname(entry)
232232
isInstalledGlobally.value
233233
= slash(relative(userRoot, process.argv[1])).includes('/.pnpm/')
234-
|| (await import('is-installed-globally')).default
234+
|| (await import('is-installed-globally')).default
235235
const clientRoot = await findPkgRoot('@slidev/client', cliRoot, true)
236236
const closestPkgRoot = dirname(await findClosestPkgJsonPath(userRoot) || userRoot)
237237
const userPkgJson = getUserPkgJson(closestPkgRoot)

packages/slidev/node/syntax/markdown-it/markdown-it-katex.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ function math_block(state: any, start: number, end: number, silent: boolean) {
155155
const token = state.push('math_block', 'math', 0)
156156
token.block = true
157157
token.content = (firstLine && firstLine.trim() ? `${firstLine}\n` : '')
158-
+ state.getLines(start + 1, next, state.tShift[start], true)
159-
+ (lastLine && lastLine.trim() ? lastLine : '')
158+
+ state.getLines(start + 1, next, state.tShift[start], true)
159+
+ (lastLine && lastLine.trim() ? lastLine : '')
160160
token.map = [start, state.line]
161161
token.markup = '$$'
162162
return true

0 commit comments

Comments
 (0)