mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 13:26:01 +01:00
17 lines
547 B
TypeScript
17 lines
547 B
TypeScript
import fs from "fs";
|
|
|
|
export function listSyntaxHighlightingThemes() {
|
|
const path = "node_modules/@highlightjs/cdn-assets/styles";
|
|
const allThemes = fs
|
|
.readdirSync(path)
|
|
.filter((el) => el.endsWith(".min.css"))
|
|
.map((name) => {
|
|
const nameWithoutExtension = name.replace(".min.css", "");
|
|
|
|
return {
|
|
val: `default:${nameWithoutExtension}`,
|
|
title: nameWithoutExtension.replace(/-/g, " ")
|
|
};
|
|
});
|
|
return allThemes;
|
|
} |