🪲 Fix regex

This commit is contained in:
Simon Schneegans
2022-05-13 09:24:47 +02:00
parent 7b8d6e18b2
commit 7ee6e2c58c
11 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -282,7 +282,7 @@ if (utils.isInShellProcess()) {
const code = utils.loadGLSLResource(`/shaders/${Fire.getNick()}.glsl`);
// Match anything between the curly brackets of "void main() {...}".
const regex = RegExp('void main *\\(\\) *\\{([\\S\\s]+)\\}', 'd');
const regex = RegExp('void main *\\(\\) *\\{([\\S\\s]+)\\}');
const match = regex.exec(code);
const declarations = code.substr(0, match.index);