fix(docs): lot of misspelling (#1180) [skip ci]

This commit is contained in:
Josh Soref
2022-08-14 12:04:03 -04:00
committed by GitHub
parent e2f27e931d
commit ab85858528
59 changed files with 115 additions and 115 deletions

View File

@@ -68,7 +68,7 @@ export default async function metrics({login, q}, {graphql, rest, plugins, conf,
if (errors.length) {
console.debug(`metrics/compute/${login} > ${errors.length} errors !`)
if (die)
throw new Error("An error occured during rendering, dying")
throw new Error("An error occurred during rendering, dying")
else
console.debug(util.inspect(errors, {depth: Infinity, maxStringLength: 256}))
}
@@ -117,7 +117,7 @@ export default async function metrics({login, q}, {graphql, rest, plugins, conf,
console.debug(`metrics/compute/${login}/embed > ${name} >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`)
if ((!name) || (typeof q !== "object") || (q === null)) {
if (die)
throw new Error("An error occured during embed rendering, dying")
throw new Error("An error occurred during embed rendering, dying")
return "<p>⚠️ Failed to execute embed function: invalid arguments</p>"
}
console.debug(`metrics/compute/${login} > embed called with`)
@@ -142,7 +142,7 @@ export default async function metrics({login, q}, {graphql, rest, plugins, conf,
//Compute rendering
const {rendered} = await metrics({login, q}, {...arguments[1], convert: ["svg", "png", "jpeg"].includes(q["config.output"]) ? q["config.output"] : null}, arguments[2])
console.debug(`metrics/compute/${login}/embed > ${name} > success >>>>>>>>>>>>>>>>>>>>>>`)
return `<img class="metrics-cachable" data-name="${name}" src="data:image/${{png: "png", jpeg: "jpeg"}[q["config.output"]] ?? "svg+xml"};base64,${Buffer.from(rendered).toString("base64")}">`
return `<img class="metrics-cacheable" data-name="${name}" src="data:image/${{png: "png", jpeg: "jpeg"}[q["config.output"]] ?? "svg+xml"};base64,${Buffer.from(rendered).toString("base64")}">`
}
//Rendering template source
let rendered = source.replace(/\{\{ (?<content>[\s\S]*?) \}\}/g, "{%= $<content> %}")

View File

@@ -63,7 +63,7 @@ export default async function presets(list, {log = true, core = null} = {}) {
catch (error) {
if (env === "action")
console.log(`::warning::skipping preset ${file}: ${error.message}`)
logger(`metrics/presets > an error occured while loading preset ${file} (${error}), ignoring`)
logger(`metrics/presets > an error occurred while loading preset ${file} (${error}), ignoring`)
}
}
return options

View File

@@ -269,7 +269,7 @@ export async function spawn(command, args = [], options = {}, {prefixed = true,
})
}
/**Check command existance */
/**Check command existence */
export async function which(command) {
try {
console.debug(`metrics/command > checking existence of ${command}`)
@@ -282,7 +282,7 @@ export async function which(command) {
return false
}
/**Code hightlighter */
/**Code highlighter */
export function highlight(code, lang) {
return lang in prism.languages ? prism.highlight(code, prism.languages[lang]) : code
}
@@ -479,7 +479,7 @@ export const svg = {
console.debug("metrics/svg/resize > successfully executed user javascript")
}
catch (error) {
console.debug(`an error occured while evaluating script: ${error}`)
console.debug(`an error occurred while evaluating script: ${error}`)
}
}
//Disable animations
@@ -510,7 +510,7 @@ export const svg = {
))
}
catch (error) {
console.debug(`metrics/svg/resize > an error occured: ${error}`)
console.debug(`metrics/svg/resize > an error occurred: ${error}`)
throw error
}
//Convert if required