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

Commit e9d3cab

Browse files
committed
fix pattern not working
1 parent 1a00d5b commit e9d3cab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

luapack.yue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

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

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

116116
extract_packages: (source) =>
117117
matches = {n: 0}
118-
fast_push matches, match for match in source::gmatch require_pattern
118+
fast_push matches, match for _, match in source::gmatch require_pattern
119119
matches
120120

121121
include: (package_name, filename) =>

0 commit comments

Comments
 (0)