mylloon.fr/static/js/libs/hljs.js

20 lines
395 B
JavaScript
Raw Normal View History

2023-04-24 16:18:54 +02:00
window.addEventListener("load", () => {
hljs.configure({
noHighlightRe: /^$/i,
languageDetectRe: /\blanguage-hljs-([\w-]+)\b/i,
});
hljs.addPlugin(new CopyButtonPlugin());
2023-04-24 16:47:38 +02:00
const aliases = {
bash: ["fish"],
};
for (const lang in aliases) {
hljs.registerAliases(aliases[lang], { languageName: lang });
}
2023-04-24 16:18:54 +02:00
hljs.highlightAll();
2023-04-24 20:58:55 +02:00
hljs.initLineNumbersOnLoad();
2023-04-24 16:18:54 +02:00
});