Browse Source

handle extra whitespace

Gregg Tavares 6 years ago
parent
commit
12024a76a2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      threejs/resources/editor.js

+ 1 - 1
threejs/resources/editor.js

@@ -58,7 +58,7 @@ function fixSourceLinks(url, source) {
   const srcRE = /(src=)"(.*?)"/g;
   const linkRE = /(href=)"(.*?")/g;
   const imageSrcRE = /((?:image|img)\.src = )"(.*?)"/g;
-  const loaderLoadRE = /(loader\.load[a-z]*\()('|")(.*?)('|")/ig;
+  const loaderLoadRE = /(loader\.load[a-z]*\s*\(\s*)('|")(.*?)('|")/ig;
   const loaderArrayLoadRE = /(loader\.load[a-z]*\(\[)([\s\S]*?)(\])/ig;
   const arrayLineRE = /^(\s*["|'])([\s\S]*?)(["|']*$)/;
   const urlPropRE = /(url:\s*)('|")(.*?)('|")/g;