19 lines
395 B
JavaScript
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();
|
|
});
|