Skip to content

Commit

Permalink
feat: transform can be async (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
kptdobe committed Jan 31, 2023
1 parent 89e0b91 commit 9441e0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/importer/HTML2x.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ async function html2x(
// for more advanced use cases, give access to the original dom with
// no preprocessing at all
if (transformer.preprocess) {
transformer.preprocess({
await transformer.preprocess({
url,
document: doc,
html: doc.documentElement.outerHTML,
Expand All @@ -99,7 +99,7 @@ async function html2x(

async process(document) {
if (transformer.transform) {
let results = transformer.transform({
let results = await transformer.transform({
url,
document,
html,
Expand Down

0 comments on commit 9441e0e

Please sign in to comment.