1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-11 18:24:43 +02:00

Tools: Fixed plugin repo table and sort by name

This commit is contained in:
Laurent Cozic 2021-01-11 12:46:21 +00:00
parent dc6ae90113
commit 25341858d5

View File

@ -102,7 +102,7 @@ async function updateReadme(readmePath: string, manifests: any) {
const headers: MarkdownTableHeader[] = [
{
name: 'homepage_url',
label: '-',
label: ' ',
filter: (value: string) => {
return `[🏠](${markdownUtils.escapeLinkUrl(value)})`;
},
@ -125,6 +125,10 @@ async function updateReadme(readmePath: string, manifests: any) {
},
];
rows.sort((a: any, b: any) => {
return a.name.toLowerCase() < b.name.toLowerCase() ? -1 : +1;
});
const mdTable = markdownUtils.createMarkdownTable(headers, rows);
const tableRegex = /<!-- PLUGIN_LIST -->([^]*)<!-- PLUGIN_LIST -->/;