We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 444003d commit 43c47e2Copy full SHA for 43c47e2
1 file changed
index.js
@@ -15,17 +15,17 @@ module.exports = function(options) {
15
if (!tree.match) tree.match = match;
16
tree.match({ tag: 'include' }, function(node) {
17
var src = node.attrs.src || false;
18
- var data = node.attrs.data || false;
+ var locals = node.attrs.locals || false;
19
var content;
20
var subtree;
21
var source;
22
if (src) {
23
src = path.resolve(options.root, src);
24
source = fs.readFileSync(src, options.encoding);
25
- if (data) {
26
- data = JSON.parse(data);
+ if (locals) {
+ locals = JSON.parse(locals);
27
var result = posthtml()
28
- .use(expressions({ locals: data }))
+ .use(expressions({ locals: locals }))
29
.process(source, { sync: true });
30
source = result.html;
31
}
0 commit comments