Skip to content

Commit e366544

Browse files
committed
(arduion) no longer has all the C/C++ aliases
Resolves highlightjs#2626. The mistake is that Arduino language incorrectly picks up the aliases of C++. This is because it inherits from C++ but does not strip off the aliases. This affects functionaltiy. It seems that later-registered languages' aliases overwrite any earlier registration. Since Arduino is registered after C++ (because the former requires the latter), calling getLanguage('c++') will give Arduino (arduino with alias c++) instead of C++ (cpp with alias c++).
1 parent d8692db commit e366544

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/languages/arduino.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ export default function(hljs) {
104104
kws.built_in += ' ' + ARDUINO_KW.built_in;
105105

106106
ARDUINO.name = 'Arduino';
107+
ARDUINO.aliases = ['ino'];
107108

108109
return ARDUINO;
109110
}

0 commit comments

Comments
 (0)