Skip to content

Commit d24895f

Browse files
authored
fix(parser) Make language alias registration case insensitive (#3026)
1 parent 68fcfb8 commit d24895f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Deprecations:
2929
API:
3030

3131
- enh(api) add `unregisterLanguage` method (#3009) [Antoine du Hamel][]
32+
- enh: Make alias registration case insensitive (#3026) [David Ostrovsky][]
3233

3334
[Stef Levesque]: https://github.com/stef-levesque
3435
[Josh Goebel]: https://github.com/joshgoebel
@@ -38,6 +39,7 @@ API:
3839
[Vyron Vasileiadis]: https://github.com/fedonman
3940
[Antoine du Hamel]: https://github.com/aduh95
4041
[Vaibhav Chanana]: https://github.com/il3ven
42+
[David Ostrovsky]: https://github.com/davido
4143

4244
## Version 10.6.0
4345

src/highlight.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ const HLJS = function(hljs) {
875875
if (typeof aliasList === 'string') {
876876
aliasList = [aliasList];
877877
}
878-
aliasList.forEach(alias => { aliases[alias] = languageName; });
878+
aliasList.forEach(alias => { aliases[alias.toLowerCase()] = languageName; });
879879
}
880880

881881
/**

0 commit comments

Comments
 (0)