Skip to content
This repository has been archived by the owner on Nov 7, 2019. It is now read-only.

Commit

Permalink
feat(parser): allow VFile to be passed to the parser
Browse files Browse the repository at this point in the history
  • Loading branch information
zkochan committed May 12, 2016
1 parent 87afca7 commit f83388c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/parse/index.js
Expand Up @@ -547,7 +547,7 @@ function parserFactory (processor) {
parse (contents, opts) {
parser.setOptions(opts)

const file = new VFile(contents)
const file = contents instanceof VFile ? contents : new VFile(contents)
const value = clean(String(file))
parser.file = file
parser.toOffset = vfileLocation(file).toOffset
Expand Down

0 comments on commit f83388c

Please sign in to comment.