fix import regexp to not pick up so much garbage (bug #1064)

This commit is contained in:
benfry
2008-11-29 17:05:48 +00:00
parent 4ef5cc6eb6
commit b3e960b8d3

View File

@@ -240,7 +240,8 @@ public class PdePreprocessor {
String prefsLine = Preferences.get("preproc.imports");
defaultImports = PApplet.splitTokens(prefsLine, ", ");
String importRegexp = "(?:^|\\s|;)(import\\s+)(\\S+)(\\s*;)";
//String importRegexp = "(?:^|\\s|;)(import\\s+)(\\S+)(\\s*;)";
String importRegexp = "(?:^|;)\\s*(import\\s+)(\\S+)(\\s*;)";
programImports = new ArrayList<String>();
do {