@rhinostone/swig-twig 2.7.2 → 2.8.0
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/lib/index.js +2 -0
- package/lib/parser.js +5 -0
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -333,6 +333,8 @@ exports.render = defaultInstance.render;
|
|
|
333
333
|
exports.renderFile = defaultInstance.renderFile;
|
|
334
334
|
exports.renderFileAsync = defaultInstance.renderFileAsync;
|
|
335
335
|
exports.run = defaultInstance.run;
|
|
336
|
+
exports.register = defaultInstance.register;
|
|
337
|
+
exports.registerBundle = defaultInstance.registerBundle;
|
|
336
338
|
exports.invalidateCache = defaultInstance.invalidateCache;
|
|
337
339
|
|
|
338
340
|
/**
|
package/lib/parser.js
CHANGED
|
@@ -244,6 +244,11 @@ exports.parseExpr = function (tokens, filters, _posOut) {
|
|
|
244
244
|
bail('Invalid filter "' + fname + '"');
|
|
245
245
|
}
|
|
246
246
|
var fargs;
|
|
247
|
+
// `fargs` must be reset each iteration — `var` is function-scoped
|
|
248
|
+
// (a bare declaration does not reset it), so without this an
|
|
249
|
+
// arg-bearing filter earlier in the chain would leak its args onto
|
|
250
|
+
// a later no-arg filter (e.g. `x|default("y")|upper`).
|
|
251
|
+
fargs = undefined;
|
|
247
252
|
if (tok.type === _t.FILTER) {
|
|
248
253
|
fargs = parseArgList(_t.PARENCLOSE);
|
|
249
254
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rhinostone/swig-twig",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
4
4
|
"description": "Twig-syntax frontend for the @rhinostone/swig-core template engine. Part of the @rhinostone/swig multi-flavor family.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"template",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"node": ">=12"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@rhinostone/swig-core": "2.
|
|
25
|
+
"@rhinostone/swig-core": "2.8.0"
|
|
26
26
|
},
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|