Skip to content

Commit

Permalink
Optimize split in checkShebangLine (#5452)
Browse files Browse the repository at this point in the history
* Optimize split in checkShebangLine

* Update build

* Update build
  • Loading branch information
Connormiha committed Sep 8, 2023
1 parent 6a64bff commit 0f02c50
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/v2/browser-compiler-legacy/coffeescript.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/v2/browser-compiler-modern/coffeescript.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/coffeescript-browser-compiler-legacy/coffeescript.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/coffeescript-browser-compiler-modern/coffeescript.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/coffeescript/coffeescript.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/coffeescript.coffee
Expand Up @@ -323,7 +323,7 @@ exports.patchStackTrace = ->
"#{err.toString()}\n#{frames.join '\n'}\n"

checkShebangLine = (file, input) ->
firstLine = input.split(/$/m)[0]
firstLine = input.split(/$/m, 1)[0]
rest = firstLine?.match(/^#!\s*([^\s]+\s*)(.*)/)
args = rest?[2]?.split(/\s/).filter (s) -> s isnt ''
if args?.length > 1
Expand Down

0 comments on commit 0f02c50

Please sign in to comment.