Skip to content

Commit

Permalink
fix(parser) Make language alias registration case insensitive (#3026)
Browse files Browse the repository at this point in the history
  • Loading branch information
davido committed Mar 2, 2021
1 parent 68fcfb8 commit d24895f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Deprecations:
API:

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

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

## Version 10.6.0

Expand Down
2 changes: 1 addition & 1 deletion src/highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ const HLJS = function(hljs) {
if (typeof aliasList === 'string') {
aliasList = [aliasList];
}
aliasList.forEach(alias => { aliases[alias] = languageName; });
aliasList.forEach(alias => { aliases[alias.toLowerCase()] = languageName; });
}

/**
Expand Down

0 comments on commit d24895f

Please sign in to comment.