Merge pull request #70 from redsquirrel/import-dot-slash-fix

Safer handling of imports with leading ./
pull/1/head
chriseth 9 years ago committed by GitHub
commit d87b3455a9
  1. 6
      src/app/compiler.js

@ -203,7 +203,11 @@ function Compiler (editor, handleGithubCall, outputField, hidingRHP, updateFiles
for (var fileName in files) {
var match;
while ((match = importRegex.exec(files[fileName]))) {
importHints.push(match[1]);
var importFilePath = match[1];
if (importFilePath.startsWith('./')) {
importFilePath = importFilePath.slice(2);
}
importHints.push(importFilePath);
}
}
while (importHints.length > 0) {

Loading…
Cancel
Save