Skip to content

Commit

Permalink
highlight generic shebangs
Browse files Browse the repository at this point in the history
  • Loading branch information
joshgoebel committed Apr 29, 2020
1 parent 111e46d commit f40d942
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/languages/bash.js
Expand Up @@ -66,7 +66,7 @@ export default function(hljs) {
"dash",
"scsh",
];
const SHEBANG = hljs.SHEBANG({
const KNOWN_SHEBANG = hljs.SHEBANG({
binary: `(${SH_LIKE_SHELLS.join("|")})`,
relevance: 10
});
Expand Down Expand Up @@ -108,7 +108,8 @@ export default function(hljs) {
'-ne -eq -lt -gt -f -d -e -s -l -a' // relevance booster
},
contains: [
SHEBANG,
KNOWN_SHEBANG, // to catch known shells and boost relevancy
hljs.SHEBANG(), // to catch unknown shells but still highlight the shebang
FUNCTION,
ARITHMETIC,
hljs.HASH_COMMENT_MODE,
Expand Down

0 comments on commit f40d942

Please sign in to comment.