Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Preprocessors may return promises, but not content.
The original API for Preprocessors assumed callback. Now promises are a valid return. If an implementer returns a promise from `process` but only resolves content via the callback, then while the result of `process` is a promise, it will not resolve to the intended content. An easy example is for `process` to be an `async` function. e.g. ``` async function process(content, file, done) { const newContent = await magic(content) done(newContent) } ```
- Loading branch information