Skip to content

Commit

Permalink
Fix registered language name for grammar names with dash, fixes #3263.
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikekre committed Jul 5, 2021
1 parent 55f68f7 commit 2fa1844
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/stub.js
Expand Up @@ -5,7 +5,7 @@ import * as builtIns from "builtInLanguages";
const hljs = HighlightJS;

for (const key of Object.keys(builtIns)) {
const languageName = key.replace("grmr_", "");
const languageName = key.replace("grmr_", "").replace("_", "-");
hljs.registerLanguage(languageName, builtIns[key]);
}
// console.log(hljs.listLanguages());
Expand Down

0 comments on commit 2fa1844

Please sign in to comment.