Skip to content
This repository has been archived by the owner on Dec 28, 2024. It is now read-only.

Commit

Permalink
fix pattern not working
Browse files Browse the repository at this point in the history
  • Loading branch information
Le0Developer committed Apr 11, 2022
1 parent 1a00d5b commit e9d3cab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions luapack.yue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

require_pattern = [[require%s*(%(%s*)?(["'])([^%1]+)%1(%s*%))?]]
require_pattern = [[require%s*%(?%s*(["'])([^%1]-)%1]]

-- imports
-- !!! using an extra function here, so the require call isn't interruped by a comma
Expand Down Expand Up @@ -115,7 +115,7 @@ export class Packer

extract_packages: (source) =>
matches = {n: 0}
fast_push matches, match for match in source::gmatch require_pattern
fast_push matches, match for _, match in source::gmatch require_pattern
matches

include: (package_name, filename) =>
Expand Down

0 comments on commit e9d3cab

Please sign in to comment.