message-box
Rich Harris 5 days ago
parent 36ed1a78be
commit 4d5fa48995
No known key found for this signature in database

@ -40,16 +40,11 @@ function run() {
const sorted = Array.from( const sorted = Array.from(
markdown.matchAll(/## ([\w]+)\n\n([^]+?)(?=$|\n\n## )/g), markdown.matchAll(/## ([\w]+)\n\n([^]+?)(?=$|\n\n## )/g),
([_, code]) => ({ ).map((m) => m[0]).sort();
code,
_
})
);
sorted.sort((a, b) => (a.code < b.code ? -1 : 1));
fs.writeFileSync( fs.writeFileSync(
`messages/${category}/${file}`, `messages/${category}/${file}`,
sorted.map((x) => x._.trim()).join('\n\n') + '\n' sorted.map((x) => x.trim()).join('\n\n') + '\n'
); );
} }

Loading…
Cancel
Save