Skip to content

Commit

Permalink
shebang can include space before path
Browse files Browse the repository at this point in the history
  • Loading branch information
joshgoebel committed Apr 29, 2020
1 parent a5a6504 commit edaefb7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/lib/modes.js
Expand Up @@ -10,16 +10,17 @@ export const BINARY_NUMBER_RE = '\\b(0b[01]+)'; // 0b...
export const RE_STARTERS_RE = '!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~';

export const SHEBANG = (opts = {}) => {
const beginShebang = /^#![ ]*\//;
if (opts.binary) {
opts.begin = regex.concat(
/^#!\//,
/.*/,
beginShebang,
/.*\b/,
opts.binary,
/\b.*/);
}
return inherit({
className: 'meta',
begin: /^#!\//,
begin: beginShebang,
end: /$/,
relevance: 0,
"on:begin": (m, resp) => {
Expand Down

0 comments on commit edaefb7

Please sign in to comment.