@bonniernews/local-esi
Advanced tools
Comparing version 0.7.0 to 0.7.1
@@ -248,3 +248,3 @@ "use strict"; | ||
return writeToResult(handleProcessingInstructions(text), next); | ||
return writeToResult(handleProcessingInstructions.bind(null, text), next); //handleProcessingInstructions may cause an (expected) error and we're not sure writeToResult will actually write so we pass a function that it can call if it should write | ||
} catch (err) { | ||
@@ -311,2 +311,6 @@ return next(err); | ||
if (text.match(/\$substr\((.*?)\)/ig)) { | ||
throw new Error("$substr invoked without start index parameter"); | ||
} | ||
text = removeReservedCharacters(text); | ||
@@ -392,2 +396,5 @@ | ||
function writeToResult(chunk, next) { | ||
if (typeof chunk === "function" && (context.inReplacement || shouldWrite())) { | ||
chunk = chunk(); | ||
} | ||
if (context.inReplacement) { | ||
@@ -394,0 +401,0 @@ context.replacement += chunk; |
{ | ||
"name": "@bonniernews/local-esi", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"description": "Local Edge Side Includes parser", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22961
648