make_squishy: Match require calls at the start of a line (thanks R D)

Sat, 24 Sep 2011 19:39:30 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Sat, 24 Sep 2011 19:39:30 +0100
changeset 84
14f827efadf2
parent 83
ff14c066a643
child 85
347ac1733354

make_squishy: Match require calls at the start of a line (thanks R D)

make_squishy file | annotate | diff | comparison | revisions
--- a/make_squishy	Sat Jan 22 18:04:56 2011 +0000
+++ b/make_squishy	Sat Sep 24 19:39:30 2011 +0100
@@ -77,7 +77,7 @@
 
 function scan_file(outfile, scanfile)
 	for line in io.lines(scanfile) do
-		for _, module in line:gmatch("[^%w_]require%s*%(?([\"'])(.-)%1") do
+		for _, module in (" "..line):gmatch("[^%w_]require%s*%(?([\"'])(.-)%1") do
 			if not modules[module] then
 				local binary;
 				modules[module] = true;

mercurial