Skip to content

Commit

Permalink
chore: lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kermanx committed Jan 28, 2025
1 parent 32a0703 commit 22979d9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions packages/client/setup/code-runners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ function runJavaScript(code: string): CodeRunnerOutputs {
// 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
textRep
= prefix
+ JSON.stringify(arg, (_, value) => (value === undefined ? '__undefined__' : value), 2).replace(
/"__undefined__"/g,
'undefined',
)
+ JSON.stringify(arg, (_, value) => (value === undefined ? '__undefined__' : value), 2).replace(
/"__undefined__"/g,
'undefined',
)

textRep = String(textRep)
}
Expand Down
2 changes: 1 addition & 1 deletion packages/slidev/node/resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ export async function getRoots(entry?: string): Promise<RootsInfo> {
const userRoot = dirname(entry)
isInstalledGlobally.value
= slash(relative(userRoot, process.argv[1])).includes('/.pnpm/')
|| (await import('is-installed-globally')).default
|| (await import('is-installed-globally')).default
const clientRoot = await findPkgRoot('@slidev/client', cliRoot, true)
const closestPkgRoot = dirname(await findClosestPkgJsonPath(userRoot) || userRoot)
const userPkgJson = getUserPkgJson(closestPkgRoot)
Expand Down
4 changes: 2 additions & 2 deletions packages/slidev/node/syntax/markdown-it/markdown-it-katex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ function math_block(state: any, start: number, end: number, silent: boolean) {
const token = state.push('math_block', 'math', 0)
token.block = true
token.content = (firstLine && firstLine.trim() ? `${firstLine}\n` : '')
+ state.getLines(start + 1, next, state.tShift[start], true)
+ (lastLine && lastLine.trim() ? lastLine : '')
+ state.getLines(start + 1, next, state.tShift[start], true)
+ (lastLine && lastLine.trim() ? lastLine : '')
token.map = [start, state.line]
token.markup = '$$'
return true
Expand Down

0 comments on commit 22979d9

Please sign in to comment.