Skip to content

Commit

Permalink
fix: ensure replaceStrings transformer runs last
Browse files Browse the repository at this point in the history
  • Loading branch information
cossssmin committed Oct 14, 2022
1 parent a7299e0 commit 4b401d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
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

0 comments on commit 4b401d1

Please sign in to comment.