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

Cannot disable safeClassNames transformer #782

Closed
cossssmin opened this issue Oct 7, 2022 · 0 comments · Fixed by #784
Closed

Cannot disable safeClassNames transformer #782

cossssmin opened this issue Oct 7, 2022 · 0 comments · Fixed by #784
Assignees
Labels
bug Something isn't working

Comments

@cossssmin
Copy link
Member

  • Maizzle Version: 4.2.1
  • Node.js Version: any

Even if you add this to your config:

module.exports = {
  safeClassNames: false,
}

The safeClassNames transformer will still run, because it also runs in filters:

return posthtml([
styleDataEmbed(),
posthtmlContent(filters),
safeClassNames()
])
.process(html, posthtmlOptions)
.then(result => result.html)

Solution

With v4.2.1 the only workaround is to disable both safeClassNames and filters by setting them to false in the config.

filters needs to be updated to respect the safeClassNames config (i.e. add the safeClassNames() plugin only if safeClassNames is set to false in the config.

@cossssmin cossssmin added the bug Something isn't working label Oct 7, 2022
@cossssmin cossssmin self-assigned this Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant