diff --git a/src/generators/render.js b/src/generators/render.js index 26759866..933d70e3 100644 --- a/src/generators/render.js +++ b/src/generators/render.js @@ -60,8 +60,6 @@ export async function render(html = '', config = {}) { * @param {string} options.html - The HTML to be transformed * @param {Object} options.matter - The front matter data * @param {Object} options.config - The current template config - * @param {function} options.posthtml - The PostHTML compiler - * @param {Object} options.transform - The transformers object * @returns {string} - The transformed HTML, or the original one if nothing was returned */ if (typeof templateConfig.beforeRender === 'function') { @@ -69,7 +67,6 @@ export async function render(html = '', config = {}) { html: content, matter: matterData, config: templateConfig, - posthtml: compilePostHTML, })) ?? content } @@ -83,8 +80,6 @@ export async function render(html = '', config = {}) { * @param {string} options.html - The HTML to be transformed * @param {Object} options.matter - The front matter data * @param {Object} options.config - The current template config - * @param {function} options.posthtml - The PostHTML compiler - * @param {Object} options.transform - The transformers object * @returns {string} - The transformed HTML, or the original one if nothing was returned */ if (typeof templateConfig.afterRender === 'function') { @@ -92,7 +87,6 @@ export async function render(html = '', config = {}) { html: compiled.html, matter: matterData, config: templateConfig, - posthtml: compilePostHTML, })) ?? compiled.html } @@ -118,8 +112,6 @@ export async function render(html = '', config = {}) { * @param {string} options.html - The HTML to be transformed * @param {Object} options.matter - The front matter data * @param {Object} options.config - The current template config - * @param {function} options.posthtml - The PostHTML compiler - * @param {Object} options.transform - The transformers object * @returns {string} - The transformed HTML, or the original one if nothing was returned */ if (typeof templateConfig.afterTransformers === 'function') { @@ -127,7 +119,6 @@ export async function render(html = '', config = {}) { html: compiled.html, matter: matterData, config: templateConfig, - posthtml: compilePostHTML, })) ?? compiled.html } diff --git a/test/render.test.js b/test/render.test.js index 1db0e4b7..1b3ab006 100644 --- a/test/render.test.js +++ b/test/render.test.js @@ -28,11 +28,11 @@ describe.concurrent('Render', () => { test('Runs the `beforeRender` event', async () => { const { html } = await render('