/g, '');
- for (let taggedSnippet of Object.entries(tagDbData).filter(v => v[1][0] === tag))
- uncategorizedOutput +=
- '' +
- md
- .render(`\n${snippets[taggedSnippet[0] + '.md']}`)
- .replace(//g, `${taggedSnippet[1].includes('advanced')?'advanced':''}
`)
- .replace(/([^\0]*?)<\/code><\/pre>/gm, (match, p1) => `${Prism.highlight(unescapeHTML(p1), Prism.languages.javascript)}`)
- .replace(/<\/pre>\s+📋 Copy to clipboard' +
- '
';
- } else {
+ .sort((a, b) => capitalize(a, true) === 'Uncategorized' ? 1 : capitalize(b, true) === 'Uncategorized' ? -1 : a.localeCompare(b))) {
output += md
.render(`## ${capitalize(tag, true)}\n`)
.replace(//g, '');
@@ -187,9 +158,7 @@ try {
.replace(/<\/pre>\s+📋 Copy to clipboard' +
'';
- }
}
- output += uncategorizedOutput;
// Add the ending static part
output += `\n${endPart + '\n'}`;
// Optimize punctuation nodes
/g, `${taggedSnippet[1].includes('advanced')?'advanced':''}
`) - .replace(/([^\0]*?)<\/code><\/pre>/gm, (match, p1) => `${Prism.highlight(unescapeHTML(p1), Prism.languages.javascript)}`)
- .replace(/<\/pre>\s+📋 Copy to clipboard' +
- '
/g, '');
@@ -187,9 +158,7 @@ try {
.replace(/<\/pre>\s+📋 Copy to clipboard' +
'';
- }
}
- output += uncategorizedOutput;
// Add the ending static part
output += `\n${endPart + '\n'}`;
// Optimize punctuation nodes
📋 Copy to clipboard' +
'';
- }
}
- output += uncategorizedOutput;
// Add the ending static part
output += `\n${endPart + '\n'}`;
// Optimize punctuation nodes