replace-all-mustaches 0.0.9 → 0.0.10
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/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/nodes/replaceAllMustaches.ts +1 -1
package/dist/index.cjs
CHANGED
|
@@ -98,7 +98,7 @@ function replaceAllMustaches(template, { maxPasses = 20, detectCycles = true } =
|
|
|
98
98
|
}
|
|
99
99
|
;
|
|
100
100
|
const next = import_mustache.default.render(current, VariableView.all);
|
|
101
|
-
if (next !== "" && next
|
|
101
|
+
if (next !== "" && next !== current) {
|
|
102
102
|
current = next;
|
|
103
103
|
} else {
|
|
104
104
|
return current;
|
package/dist/index.js
CHANGED
|
@@ -58,7 +58,7 @@ function replaceAllMustaches(template, { maxPasses = 20, detectCycles = true } =
|
|
|
58
58
|
}
|
|
59
59
|
;
|
|
60
60
|
const next = Mustache.render(current, VariableView.all);
|
|
61
|
-
if (next !== "" && next
|
|
61
|
+
if (next !== "" && next !== current) {
|
|
62
62
|
current = next;
|
|
63
63
|
} else {
|
|
64
64
|
return current;
|
package/package.json
CHANGED
|
@@ -33,7 +33,7 @@ export function replaceAllMustaches(
|
|
|
33
33
|
const next = Mustache.render(current, VariableView.all);
|
|
34
34
|
|
|
35
35
|
// If the string's not empty and it's not the same as the current string...
|
|
36
|
-
if (next !== "" && next
|
|
36
|
+
if (next !== "" && next !== current){
|
|
37
37
|
current = next;
|
|
38
38
|
} else {
|
|
39
39
|
return current; // no more substitutions happened
|