From 9f5b5a678561abc52f490e33bd6344620ff0b26d Mon Sep 17 00:00:00 2001 From: lowlighter <22963968+lowlighter@users.noreply.github.com> Date: Sat, 15 Jan 2022 18:08:05 -0500 Subject: [PATCH] build: markdown short description for `metadata.yml` [skip ci] --- source/app/metrics/metadata.mjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/app/metrics/metadata.mjs b/source/app/metrics/metadata.mjs index 1e5688ac..63c331f3 100644 --- a/source/app/metrics/metadata.mjs +++ b/source/app/metrics/metadata.mjs @@ -287,7 +287,7 @@ metadata.plugin = async function({__plugins, __templates, name, logger}) { const header = [ "", ` `, - ` `, + ` `, " ", ' ', ` `, @@ -304,7 +304,7 @@ metadata.plugin = async function({__plugins, __templates, name, logger}) { ...(meta.scopes ?? []).map(scope => `🔑 ${{public_access:"(scopeless)"}[scope] ?? scope}`), ...Object.entries(inputs).filter(([_, {type}]) => type === "token").map(([token]) => `🗝️ ${token}`), ...(meta.scopes?.length ? ["read:org", "read:user", "repo"].map(scope => !meta.scopes.includes(scope) ? `${scope} (optional)` : null).filter(v => v) : []) - ].join(" ")}`, + ].filter(v => v).join(" ") || "No tokens are required for this plugin"}`, " ", " ", demos({colspan:2, examples:meta.examples}), @@ -408,7 +408,7 @@ metadata.template = async function({__templates, name, plugins, logger}) { const header = [ "

${meta.name}

${(meta.description ?? "").replace(/\n/g, "
")}
${marked.parse(meta.description ?? "", {silent:true})}
Supported features
→ Full specification
${Object.entries(compatibility).filter(([_, value]) => value).map(([id]) => `${templates[id].name ?? ""}`).join(" ")}
", ` `, - ` `, + ` `, " ", ' ', ` `,

${meta.name ?? "(unnamed template)"}

${(meta.description ?? "").replace(/\n/g, "
")}
${marked.parse(meta.description ?? "", {silent:true})}
Supported features
→ Full specification
${Object.entries(compatibility).filter(([_, value]) => value).map(([id]) => `${plugins[id].icon}`).join(" ")}${meta.formats?.includes("markdown") ? " ✓ embed()" : ""}