Commit 1203af74 authored by Dave Hoover's avatar Dave Hoover

Small optimization

Currently the `importRegex` doesn't match unless there is exactly one space between `import` and `"file.sol"`. If someone put two+ spaces (or zero spaces) between `import` and `"file.sol"`, then the files have to be compiled twice.
parent 2222e0b1
......@@ -708,7 +708,7 @@ var run = function() {
cb(files[fileNameFromKey(SOL_CACHE_FILE)]);
return;
}
var importRegex = /import\s[\'\"]([^\'\"]+)[\'\"];/g;
var importRegex = /import\s*[\'\"]([^\'\"]+)[\'\"];/g;
var reloop = false;
do {
reloop = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment