chore: code formatting

This commit is contained in:
github-actions[bot]
2023-03-13 04:39:48 +00:00
parent 522b7e74b1
commit 78709320de
16 changed files with 47 additions and 32 deletions

View File

@@ -455,7 +455,7 @@ function quit(reason) {
info("Previous hash", previous)
const current = await svg.hash(rendered)
info("Current hash", current)
const changed = (previous !== current)
const changed = previous !== current
info("Content changed", changed)
if (!changed)
committer.commit = false
@@ -632,7 +632,8 @@ function quit(reason) {
info(`Branch ${committer.head}`, "(deleted)")
}, {retries: retries_output_action, delay: retries_delay_output_action})
break
} while (--attempts)
}
while (--attempts)
}
}

View File

@@ -524,7 +524,7 @@ export const svg = {
const padding = {width: 1, height: 1, absolute: {width: 0, height: 0}}
paddings = Array.isArray(paddings) ? paddings : `${paddings}`.split(",").map(x => x.trim())
for (const [i, dimension] of [[0, "width"], [1, "height"]]) {
let operands = (paddings?.[i] ?? paddings[0])
let operands = paddings?.[i] ?? paddings[0]
let {relative} = operands.match(/(?<relative>[+-]?[\d.]+)%$/)?.groups ?? {}
operands = operands.replace(relative, "").trim()
let {absolute} = operands.match(/^(?<absolute>[+-]?[\d.]+)/)?.groups ?? {}

View File

@@ -138,7 +138,8 @@
console.warn(`${plugin}: no data yet, retrying in ${interval} seconds`)
await new Promise(solve => setTimeout(solve, interval * 1000))
}
} while (--attempts)
}
while (--attempts)
completed++
this.progress = completed / (data.plugins.length + 1)
this.loaded.push(plugin)