mylloon.fr/static/js/libs/hljs.js
2023-04-24 20:58:55 +02:00

19 lines
395 B
JavaScript

window.addEventListener("load", () => {
hljs.configure({
noHighlightRe: /^$/i,
languageDetectRe: /\blanguage-hljs-([\w-]+)\b/i,
});
hljs.addPlugin(new CopyButtonPlugin());
const aliases = {
bash: ["fish"],
};
for (const lang in aliases) {
hljs.registerAliases(aliases[lang], { languageName: lang });
}
hljs.highlightAll();
hljs.initLineNumbersOnLoad();
});