@evlop/commons 1.0.257 → 1.0.258
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/src/edl/parser.js
CHANGED
@@ -67,7 +67,7 @@ function removeUnnecessaryWhitespace(htmlString) {
|
|
67
67
|
.trim(); // Trim leading and trailing whitespaces
|
68
68
|
}
|
69
69
|
const scriptTagRegex = /<(Script)([^>]*?)>(.*?)<\/\1>/gs;
|
70
|
-
const variableDeclarationRegex = /(const|var|let)\s+(\$[a-zA-Z0-9_]+)/g;
|
70
|
+
const variableDeclarationRegex = /(const|var|let|function)\s+(\$[a-zA-Z0-9_]+)/g;
|
71
71
|
function extractScriptsAndVariables(inputString) {
|
72
72
|
// Initialize an empty object to store the scripts by their unique IDs
|
73
73
|
const scriptsById = {};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"parser.js","sourceRoot":"","sources":["../../../src/edl/parser.ts"],"names":[],"mappings":";;AAAA,mCAAgE;AAChE,2BAAkD;AAElD,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,gBAAgB,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,gBAAgB,EAAE,cAAc,CAAC,CAAC;AAEnI,oCAAoC;AACpC,MAAM,eAAe,GAAG,gCAAgC,CAAC;AAEzD,oCAAoC;AACpC,MAAM,eAAe,GAAG,qKAAqK,CAAC;AAE9L,oCAAoC;AACpC,MAAM,eAAe,GAAG,qBAAqB,CAAC;AAE9C,4BAA4B;AAC5B,MAAM,cAAc,GAAG,mIAAmI,CAAC;AAE3J,uFAAuF;AACvF,MAAM,wBAAwB,GAAG,oLAAoL,CAAA;AAErN,MAAM,gBAAgB,GAAG;IAEvB,+CAA+C,EAAE,CAAC,cAAsB,EAAE,EAAE;QAC1E,MAAM,KAAK,GAAG,EAAE,CAAC;QAEjB,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,eAAe,CAAC,CAAC;QAC1C,IAAI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