Skip to content

Commit 8968c4c

Browse files
committed
fix: migration on posthtml v0.12.0
1 parent 3fc4530 commit 8968c4c

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,3 +1,4 @@
1+
var parser = require('posthtml-parser');
12
var fs = require('fs');
23
var path = require('path');
34

@@ -7,6 +8,7 @@ module.exports = function(options) {
78
options.encoding = options.encoding || 'utf-8';
89

910
return function posthtmlInclude(tree) {
11+
if (!tree.parser) tree.parser = parser;
1012
tree.match({ tag: 'include' }, function(node) {
1113
var src = node.attrs.src || false;
1214
var content;

0 commit comments

Comments
 (0)