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