Skip to content

Commit

Permalink
fix language aliases and demo building
Browse files Browse the repository at this point in the history
  • Loading branch information
joshgoebel committed Jan 31, 2020
1 parent ff66769 commit 7bd464d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ The table below shows the full list of supported languages (and corresponding cl
| BNF | bnf | |
| Brainfuck | brainfuck, bf | |
| C# | csharp, cs | |
| C++ | cpp, c, cc, h, c++, h++, hpp | |
| C | h | |
| C++ | cpp, hpp, cc, hh, c++, h++, cxx, hxx | |
| C/AL | cal | |
| Cache Object Script | cos, cls | |
| CMake | cmake, cmake.in | |
Expand Down
1 change: 1 addition & 0 deletions src/languages/c.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ function(hljs) {
// See further comments in c-like.js.

// lang.disableAutodetect = false;
lang.aliases = ['c', 'h'];
return lang;

}
2 changes: 1 addition & 1 deletion src/languages/cpp.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ function(hljs) {
var lang = hljs.getLanguage('c-like').rawDefinition();
// return auto-detection back on
lang.disableAutodetect = false;
lang.aliases = ['cc', 'c++', 'h++', 'hpp', 'hh', 'hxx', 'cxx'];
return lang;

}
2 changes: 1 addition & 1 deletion tools/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ tasks.readSnippet = function(options, blob, done) {
snippetName = path.join('test', 'detect', name, 'default.txt');

function onRead(error, blob) {
if(error) return done(error); // ignore missing snippets
if(error) return done(null); // ignore missing snippets

let meta = { name: `${name}.js`, fileInfo: fileInfo };

Expand Down

0 comments on commit 7bd464d

Please sign in to comment.