Skip to content

Commit 10ea86c

Browse files
committed
fix: tree.match is not a function, close #33
1 parent dac5e57 commit 10ea86c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
var parser = require('posthtml-parser');
2+
var match = require('posthtml/lib/api').match;
23
var fs = require('fs');
34
var path = require('path');
45

@@ -9,6 +10,7 @@ module.exports = function(options) {
910

1011
return function posthtmlInclude(tree) {
1112
if (!tree.parser) tree.parser = parser;
13+
if (!tree.match) tree.match = match;
1214
tree.match({ tag: 'include' }, function(node) {
1315
var src = node.attrs.src || false;
1416
var content;

0 commit comments

Comments
 (0)