File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,17 @@ Language grammar improvements:
14
14
- enh(php) Add ` mixed ` to list of keywords (#2997 ) [ Ayesh] [ ]
15
15
- enh(php) Add support binary, octal, hex and scientific numerals with underscore separator support (#2997 ) [ Ayesh] [ ]
16
16
17
+ API:
18
+
19
+ - enh(api) add ` unregisterLanguage ` method (#3009 ) [ Antoine du Hamel] [ ]
20
+
17
21
[ Stef Levesque ] : https://github.com/stef-levesque
18
22
[ Josh Goebel ] : https://github.com/joshgoebel
19
23
[ John Cheung ] : https://github.com/Real-John-Cheung
20
24
[ xDGameStudios ] : https://github.com/xDGameStudios
21
25
[ Ayesh ] : https://github.com/Ayesh
22
26
[ Vyron Vasileiadis ] : https://github.com/fedonman
27
+ [ Antoine du Hamel ] : https://github.com/aduh95
23
28
24
29
## Version 10.6.0
25
30
Original file line number Diff line number Diff line change @@ -814,6 +814,15 @@ const HLJS = function(hljs) {
814
814
}
815
815
}
816
816
817
+ /**
818
+ * Remove a language grammar module
819
+ *
820
+ * @param {string } languageName
821
+ */
822
+ function unregisterLanguage ( languageName ) {
823
+ delete languages [ languageName ] ;
824
+ }
825
+
817
826
/**
818
827
* @returns {string[] } List of language internal names
819
828
*/
@@ -916,6 +925,7 @@ const HLJS = function(hljs) {
916
925
initHighlighting,
917
926
initHighlightingOnLoad,
918
927
registerLanguage,
928
+ unregisterLanguage,
919
929
listLanguages,
920
930
getLanguage,
921
931
registerAliases,
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ interface PublicApi {
24
24
initHighlightingOnLoad : ( ) => void
25
25
highlightAll : ( ) => void
26
26
registerLanguage : ( languageName : string , language : LanguageFn ) => void
27
+ unregisterLanguage : ( languageName : string ) => void
27
28
listLanguages : ( ) => string [ ]
28
29
registerAliases : ( aliasList : string | string [ ] , { languageName } : { languageName : string } ) => void
29
30
getLanguage : ( languageName : string ) => Language | undefined
You can’t perform that action at this time.
0 commit comments