fix(docs): support for zero behaviour [skip ci]

This commit is contained in:
lowlighter
2022-01-15 13:37:07 -05:00
parent d0af0ccf04
commit 396873dc78

View File

@@ -328,7 +328,7 @@ metadata.plugin = async function({__plugins, __templates, name, logger}) {
if (o.global)
cell.push("⏭️ Global option<br>")
if (o.testing)
cell.push("🔧 For development")
cell.push("🔧 For development<br>")
if (!Object.keys(previous?.inputs ?? {}).includes(option))
cell.push("✨ On <code>master</code>/<code>main</code><br>")
if (o.extras)
@@ -336,13 +336,15 @@ metadata.plugin = async function({__plugins, __templates, name, logger}) {
cell.push(`<b>type:</b> <code>${type}</code>`)
if ("format" in o)
cell.push(`<i>(${Array.isArray(o.format) ? o.format[0] : o.format})</i>`)
cell.push("<br>")
if ("min" in o)
cell.push(`<i>(${o.min}`)
if (("min" in o)||("max" in o))
cell.push(`${"min" in o ? "" : "<i>("}𝑥${"max" in o ? "" : ")</i>"}`)
if ("max" in o)
cell.push(`${o.max})</i>`)
cell.push("<br>")
if ("zero" in o)
cell.push(`<b>zero behaviour:</b> ${o.zero}</br>`)
if (("default" in o)&&(o.default !== "")) {
let text = o.default
if (o.default === ".user.login")