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:
parent
dc6ae90113
commit
25341858d5
@ -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 -->/;
|
||||
|
Loading…
Reference in New Issue
Block a user