Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ensure replaceStrings transformer runs last #804

Merged
merged 1 commit into from Oct 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/generators/output/to-string.js
@@ -1,9 +1,8 @@
const fm = require('front-matter')
const {get, merge} = require('lodash')
const posthtml = require('../posthtml')
const Tailwind = require('../tailwindcss')
const Transformers = require('../../transformers')
const posthtmlMSO = require('../../transformers/posthtmlMso')
const Tailwind = require('../tailwindcss')
const Config = require('../config')

module.exports = async (html, options) => {
Expand Down Expand Up @@ -60,8 +59,6 @@ module.exports = async (html, options) => {
html = await options.afterTransformers(html, config)
}

html = await posthtmlMSO(html, config)

return {
html,
config
Expand Down
4 changes: 3 additions & 1 deletion src/transformers/index.js
@@ -1,10 +1,11 @@
const inline = require('./inlineCss')
const minify = require('./minify')
const filters = require('./filters')
const inline = require('./inlineCss')
const markdown = require('./markdown')
const prettify = require('./prettify')
const ensureSixHEX = require('./sixHex')
const applyBaseUrl = require('./baseUrl')
const posthtmlMSO = require('./posthtmlMso')
const addURLParams = require('./urlParameters')
const preventWidows = require('./preventWidows')
const replaceStrings = require('./replaceStrings')
Expand Down Expand Up @@ -35,6 +36,7 @@ exports.process = async (html, config) => {
html = await applyBaseUrl(html, config)
html = await addURLParams(html, config)
html = await ensureSixHEX(html, config)
html = await posthtmlMSO(html, config)
html = await prettify(html, config)
html = await minify(html, config)
html = await replaceStrings(html, config)
Expand Down