diff --git a/src/common/data/clarity-ref.ts b/src/common/data/clarity-ref.ts index b84be0e4..d48af43e 100644 --- a/src/common/data/clarity-ref.ts +++ b/src/common/data/clarity-ref.ts @@ -24,8 +24,10 @@ const generateMarkdown = () => { let keywords = ''; let functions = ''; - CLARITY_REFERENCE.functions.forEach(entry => { - functions += ` + CLARITY_REFERENCE.functions + .sort((a, b) => a.name.localeCompare(b.name)) + .forEach(entry => { + functions += ` ### ${entry.name} **Signature:** ${inlineCode(entry.signature)} @@ -42,10 +44,12 @@ ${entry.description.trim()} ${wrapInClarityTicks(entry.example)} `; - }); + }); - CLARITY_REFERENCE.keywords.forEach(entry => { - keywords += `### ${entry.name} + CLARITY_REFERENCE.keywords + .sort((a, b) => a.name.localeCompare(b.name)) + .forEach(entry => { + keywords += `### ${entry.name} **Output:** ${inlineCode(entry.output_type)} @@ -56,7 +60,7 @@ ${entry.description.trim()} ${wrapInClarityTicks(entry.example)} `; - }); + }); return { keywords,