Skip to content

Commit

Permalink
fix: prevent prettier from formatting embedded code
Browse files Browse the repository at this point in the history
  • Loading branch information
cossssmin committed Jan 18, 2024
1 parent 49f5136 commit e945952
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/transformers/prettify.js
Expand Up @@ -7,6 +7,7 @@ module.exports = async (html, config = {}, direct = false) => {
const defaultConfig = {
parser: 'html',
printWidth: 500,
embeddedLanguageFormatting: 'off',
htmlWhitespaceSensitivity: 'ignore',
xmlMode: get(config, 'posthtml.options.xmlMode', false)
}
Expand Down
6 changes: 3 additions & 3 deletions test/expected/components/kitchen-sink.html
Expand Up @@ -4,9 +4,9 @@
<html lang="en" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<style>
.text-sm {
font-size: 0.875rem;
line-height: 1.25rem;
.text-sm {
font-size: 0.875rem;
line-height: 1.25rem
}
</style>
</head>
Expand Down

0 comments on commit e945952

Please sign in to comment.