Improve "void setup" regexp

Now captures multiple whitespace characters between "void" and "setup"
This commit is contained in:
Jakub Valtar
2015-09-09 12:42:40 -04:00
parent c0de3e36f7
commit dd18ab02c9

View File

@@ -171,7 +171,7 @@ public class PdePreprocessor {
// "(?:^|\\s|;)void\\s";
/** Used to grab the start of setup() so we can mine it for size() */
static private final String VOID_SETUP_REGEX =
"(?:^|\\s|;)void\\ssetup\\s*\\(";
"(?:^|\\s|;)void\\s+setup\\s*\\(";
// Can't only match any 'public class', needs to be a PApplet