mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-23 09:35:02 +00:00
testing
This commit is contained in:
parent
543ccda3d3
commit
6bc975e4b2
2 changed files with 5 additions and 6 deletions
|
@ -70,6 +70,8 @@ export const TagsPlugin = zeppelinGuildPlugin<TagsPluginType>()({
|
|||
You use them by adding a \`{}\` on your tag.
|
||||
|
||||
### Available Functions
|
||||
Here are the functions you can use in your tags:
|
||||
|
||||
${generateTemplateMarkdown(TemplateFunctions)}
|
||||
`),
|
||||
},
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue