diff --git a/packages/string-templates/src/helpers/external.js b/packages/string-templates/src/helpers/external.js index 7451384293..7e849c8fc3 100644 --- a/packages/string-templates/src/helpers/external.js +++ b/packages/string-templates/src/helpers/external.js @@ -65,4 +65,4 @@ export function unregisterAll(handlebars) { externalHelperNames = [] } -export const externalHelperNames = [] +export let externalHelperNames = [] diff --git a/packages/string-templates/src/utilities.js b/packages/string-templates/src/utilities.js index 9393defc00..017f38db47 100644 --- a/packages/string-templates/src/utilities.js +++ b/packages/string-templates/src/utilities.js @@ -17,8 +17,8 @@ export const isJSAllowed = () => { // original regex: /(? { let copied = string - const doubleRegex = new RegExp(exports.FIND_HBS_REGEX) - const regex = new RegExp(exports.FIND_TRIPLE_HBS_REGEX) + const doubleRegex = new RegExp(FIND_HBS_REGEX) + const regex = new RegExp(FIND_TRIPLE_HBS_REGEX) const tripleMatches = copied.match(regex) // remove triple braces if (tripleMatches) { @@ -42,14 +42,14 @@ export const removeHandlebarsStatements = ( string, replacement = "Invalid binding" ) => { - let regexp = new RegExp(exports.FIND_HBS_REGEX) + let regexp = new RegExp(FIND_HBS_REGEX) let matches = string.match(regexp) if (matches == null) { return string } for (let match of matches) { const idx = string.indexOf(match) - string = exports.swapStrings(string, idx, match.length, replacement) + string = swapStrings(string, idx, match.length, replacement) } return string }