Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
taufik-nurrohman committed Feb 18, 2020
1 parent 1c4d02c commit 3c8f550
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,9 @@ const HLJS = function(hljs) {
if (lang.aliases) {
lang.aliases.forEach(function(alias) {aliases[alias] = name;});
}
if (lang.extensions) {
lang.extensions.forEach(function(extension) {aliases[extension] = name;});
}
}

function listLanguages() {
Expand Down
2 changes: 1 addition & 1 deletion src/languages/apache.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default function(hljs) {
begin: ":\\d{1,5}"
};
return {
name: 'Apache',
name: 'Apache config',
aliases: ['apacheconf', 'htaccess'], // TODO: Move `htaccess` to `extensions` property
case_insensitive: true,
contains: [
Expand Down
1 change: 0 additions & 1 deletion src/languages/c-like.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ export default function(hljs) {
};

return {
name: 'C-like',
aliases: ['c', 'cc', 'h', 'c++', 'h++', 'hpp', 'hh', 'hxx', 'cxx'],
keywords: CPP_KEYWORDS,
// the base c-like language will NEVER be auto-detected, rather the
Expand Down
2 changes: 1 addition & 1 deletion src/languages/julia.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ export default function(hljs) {

// placeholder for recursive self-reference
var DEFAULT = {
name: 'Julia',
lexemes: VARIABLE_NAME_RE, keywords: KEYWORDS, illegal: /<\//
};

Expand Down Expand Up @@ -149,6 +148,7 @@ export default function(hljs) {
]
};

DEFAULT.name = 'Julia';
DEFAULT.contains = [
NUMBER,
CHAR,
Expand Down
2 changes: 1 addition & 1 deletion src/languages/yaml.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default function(hljs) {
return {
name: 'YAML',
case_insensitive: true,
aliases: ['yml', 'YAML'],
aliases: ['yml', 'YAML', 'yaml'],
contains: [
KEY,
{
Expand Down

0 comments on commit 3c8f550

Please sign in to comment.