Skip to content

Commit

Permalink
Include from in subtree
Browse files Browse the repository at this point in the history
  • Loading branch information
clarfonthey committed Nov 8, 2022
1 parent 9442535 commit 5d3bdd3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ module.exports = (options = {}) => {
}

subtree = tree.parser(source);
subtree.options = subtree.options || {};
subtree.options.from = path.isAbsolute(src)
? src
: tree.options.from
? path.relative(tree.options.from, src)
: src;
subtree.match = tree.match;
subtree.parser = tree.parser;
subtree.messages = tree.messages;
Expand Down

0 comments on commit 5d3bdd3

Please sign in to comment.