-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Trying to validate a sugarcube game I decomplied. The findAllCustomMacros function is not finding the macro definitions. Here's the hack I put in to get the macros. Pretty sure this is ignoring the tag attribute, but this removes the false errors for my validation.
let startIndex = 0;
let index = userscript.indexOf(macroStartSyntax, startIndex);
while (index !== -1) {
if (index === -1) return;
let innerStartIndex = index + macroStartSyntax.length;
const possibleEndIndex = userscript.indexOf(',', innerStartIndex);
const macroCode = userscript.substring(innerStartIndex, possibleEndIndex).replace(/["']/g, "").trim();
addSimpleMacro(macroCode, false)
startIndex = possibleEndIndex;
index = userscript.indexOf(macroStartSyntax, startIndex);
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels