diff --git a/backend/src/plugins/Tags/TagsPlugin.ts b/backend/src/plugins/Tags/TagsPlugin.ts index f43169a1..084a0e3a 100644 --- a/backend/src/plugins/Tags/TagsPlugin.ts +++ b/backend/src/plugins/Tags/TagsPlugin.ts @@ -70,6 +70,8 @@ export const TagsPlugin = zeppelinGuildPlugin()({ You use them by adding a \`{}\` on your tag. ### Available Functions + Here are the functions you can use in your tags: + ${generateTemplateMarkdown(TemplateFunctions)} `), }, diff --git a/backend/src/plugins/Tags/docs.ts b/backend/src/plugins/Tags/docs.ts index ee990dc2..0203e2f0 100644 --- a/backend/src/plugins/Tags/docs.ts +++ b/backend/src/plugins/Tags/docs.ts @@ -1,19 +1,16 @@ import { TemplateFunction } from "./types"; export function generateTemplateMarkdown(definitions: TemplateFunction[]): string { - const table = definitions + return definitions .map(def => { - const argsString = def.signature ?? `(${def.arguments.join(", ")})`; - const usage = def.signature ? `| ${def.signature} |` : argsString; + const usage = def.signature ?? `(${def.arguments.join(", ")})`; const exampl = def.examples ? def.examples.map(ex => `> ${ex}`).join("\n") : ""; return ` #### ${def.name} - \`${usage}\` + \`{${usage}}\` **${def.description}** ${exampl} `; }) .join("\n\n"); - - return table; }