Skip to content

Commit

Permalink
fix: remove custom regexes in prettier output reformatting
Browse files Browse the repository at this point in the history
using `embeddedLanguageFormatting: 'off',` is enough
  • Loading branch information
cossssmin committed Jan 21, 2024
1 parent e945952 commit 1d3c97b
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/transformers/prettify.js
Expand Up @@ -32,10 +32,4 @@ const reFormat = (html, config) => {
}

return html
.replace(/,\s*/g, ', ')
.replace(/(\s+style="\s+)([\s\S]*?)(\s+")/g, (match, p1, p2, p3) => {
return p1.replace(/\n\s+?(style)/g, ' $1').trimEnd()
+ p2.replace(/\s+/g, ' ').trim()
+ p3.trim()
})
}

0 comments on commit 1d3c97b

Please sign in to comment.