Skip to content

Commit

Permalink
Fix encoding issue (backport logic from main module) (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
aivus authored Sep 10, 2023
1 parent 45788d9 commit 66258f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class SaveResourceToExistingDirectoryPlugin {
registerAction('saveResource', async ({resource}) => {
const filename = path.join(absoluteDirectoryPath, resource.getFilename());
const text = resource.getText();
await fs.outputFile(filename, text, { encoding: 'binary' });
await fs.outputFile(filename, text, { encoding: resource.getEncoding() });
loadedResources.push(resource);
});
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
"chai": "^4.2.0",
"eslint": "^8.5.0",
"mocha": "^10.0.0",
"website-scraper": "^5.0.0"
"website-scraper": "^5.2.0"
},
"peerDependencies": {
"website-scraper": "^5.0.0"
"website-scraper": "^5.2.0"
},
"files": [
"index.js"
Expand Down

0 comments on commit 66258f8

Please sign in to comment.