Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HTML: Fix format on
style[lang="sass"]
(#9051)
Co-authored-by: prettifier[bot] <45367598+prettifier[bot]@users.noreply.github.com>
- Loading branch information
Showing
23 changed files
with
393 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#### Fix format on `style[lang="sass"]` ([#9051](https://github.com/prettier/prettier/pull/9051) by [@fisker](https://github.com/fisker)) | ||
|
||
<!-- prettier-ignore --> | ||
```jsx | ||
<!-- Input --> | ||
<style lang="sass"> | ||
.hero | ||
@include background-centered | ||
</style> | ||
|
||
<!-- Prettier stable --> | ||
<style lang="sass"> | ||
.hero @include background-centered; | ||
</style> | ||
|
||
<!-- Prettier master --> | ||
<style lang="sass"> | ||
.hero | ||
@include background-centered | ||
</style> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
81 changes: 81 additions & 0 deletions
81
tests/html/multiparser/unknown/__snapshots__/jsfmt.spec.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`unknown-lang.html format 1`] = ` | ||
====================================options===================================== | ||
parsers: ["html"] | ||
printWidth: 80 | ||
| printWidth | ||
=====================================input====================================== | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Document</title> | ||
</head> | ||
<body> | ||
<style lang="unknown"> | ||
.prettier { | ||
content: | ||
"awesome" | ||
} | ||
</style> | ||
<script lang="unknown"> | ||
prettier.is | ||
.awesome( | ||
) | ||
</script> | ||
<script type="unknown"> | ||
prettier.is | ||
.awesome( | ||
) | ||
</script> | ||
<script type="unknown" lang="unknown"> | ||
prettier.is | ||
.awesome( | ||
) | ||
</script> | ||
</body> | ||
</html> | ||
=====================================output===================================== | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Document</title> | ||
</head> | ||
<body> | ||
<style lang="unknown"> | ||
.prettier { | ||
content: | ||
"awesome" | ||
} | ||
</style> | ||
<script lang="unknown"> | ||
prettier.is | ||
.awesome( | ||
) | ||
</script> | ||
<script type="unknown"> | ||
prettier.is | ||
.awesome( | ||
) | ||
</script> | ||
<script type="unknown" lang="unknown"> | ||
prettier.is | ||
.awesome( | ||
) | ||
</script> | ||
</body> | ||
</html> | ||
================================================================================ | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
run_spec(__dirname, ["html"]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Document</title> | ||
</head> | ||
<body> | ||
<style lang="unknown"> | ||
.prettier { | ||
content: | ||
"awesome" | ||
} | ||
</style> | ||
|
||
<script lang="unknown"> | ||
prettier.is | ||
.awesome( | ||
) | ||
</script> | ||
|
||
<script type="unknown"> | ||
prettier.is | ||
.awesome( | ||
) | ||
</script> | ||
|
||
<script type="unknown" lang="unknown"> | ||
prettier.is | ||
.awesome( | ||
) | ||
</script> | ||
</body> | ||
</html> |
219 changes: 219 additions & 0 deletions
219
tests/vue/multiparser/unknown/__snapshots__/jsfmt.spec.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,219 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`unknown.vue - {"embeddedLanguageFormatting":"off"} format 1`] = ` | ||
====================================options===================================== | ||
embeddedLanguageFormatting: "off" | ||
parsers: ["vue"] | ||
printWidth: 80 | ||
| printWidth | ||
=====================================input====================================== | ||
<style lang="unknown"> | ||
.prettier { | ||
content: | ||
"awesome" | ||
} | ||
</style> | ||
<script lang="unknown"> | ||
prettier.is | ||
.awesome( | ||
) | ||
</script> | ||
<script type="unknown"> | ||
prettier.is | ||
.awesome( | ||
) | ||
</script> | ||
<script type="unknown" lang="unknown"> | ||
prettier.is | ||
.awesome( | ||
) | ||
</script> | ||
<template lang="unknown"> | ||
<prettier> | ||
awesome | ||
</prettier> | ||
</template> | ||
=====================================output===================================== | ||
<style lang="unknown"> | ||
.prettier { | ||
content: | ||
"awesome" | ||
} | ||
</style> | ||
<script lang="unknown"> | ||
prettier.is | ||
.awesome( | ||
) | ||
</script> | ||
<script type="unknown"> | ||
prettier.is | ||
.awesome( | ||
) | ||
</script> | ||
<script type="unknown" lang="unknown"> | ||
prettier.is | ||
.awesome( | ||
) | ||
</script> | ||
<template lang="unknown"> | ||
<prettier> | ||
awesome | ||
</prettier> | ||
</template> | ||
================================================================================ | ||
`; | ||
|
||
exports[`unknown.vue - {"vueIndentScriptAndStyle":true} format 1`] = ` | ||
====================================options===================================== | ||
parsers: ["vue"] | ||
printWidth: 80 | ||
vueIndentScriptAndStyle: true | ||
| printWidth | ||
=====================================input====================================== | ||
<style lang="unknown"> | ||
.prettier { | ||
content: | ||
"awesome" | ||
} | ||
</style> | ||
<script lang="unknown"> | ||
prettier.is | ||
.awesome( | ||
) | ||
</script> | ||
<script type="unknown"> | ||
prettier.is | ||
.awesome( | ||
) | ||
</script> | ||
<script type="unknown" lang="unknown"> | ||
prettier.is | ||
.awesome( | ||
) | ||
</script> | ||
<template lang="unknown"> | ||
<prettier> | ||
awesome | ||
</prettier> | ||
</template> | ||
=====================================output===================================== | ||
<style lang="unknown"> | ||
.prettier { | ||
content: | ||
"awesome" | ||
} | ||
</style> | ||
<script lang="unknown"> | ||
prettier.is | ||
.awesome( | ||
) | ||
</script> | ||
<script type="unknown"> | ||
prettier.is | ||
.awesome( | ||
) | ||
</script> | ||
<script type="unknown" lang="unknown"> | ||
prettier.is | ||
.awesome( | ||
) | ||
</script> | ||
<template lang="unknown"> | ||
<prettier> | ||
awesome | ||
</prettier> | ||
</template> | ||
================================================================================ | ||
`; | ||
|
||
exports[`unknown.vue format 1`] = ` | ||
====================================options===================================== | ||
parsers: ["vue"] | ||
printWidth: 80 | ||
| printWidth | ||
=====================================input====================================== | ||
<style lang="unknown"> | ||
.prettier { | ||
content: | ||
"awesome" | ||
} | ||
</style> | ||
<script lang="unknown"> | ||
prettier.is | ||
.awesome( | ||
) | ||
</script> | ||
<script type="unknown"> | ||
prettier.is | ||
.awesome( | ||
) | ||
</script> | ||
<script type="unknown" lang="unknown"> | ||
prettier.is | ||
.awesome( | ||
) | ||
</script> | ||
<template lang="unknown"> | ||
<prettier> | ||
awesome | ||
</prettier> | ||
</template> | ||
=====================================output===================================== | ||
<style lang="unknown"> | ||
.prettier { | ||
content: | ||
"awesome" | ||
} | ||
</style> | ||
<script lang="unknown"> | ||
prettier.is | ||
.awesome( | ||
) | ||
</script> | ||
<script type="unknown"> | ||
prettier.is | ||
.awesome( | ||
) | ||
</script> | ||
<script type="unknown" lang="unknown"> | ||
prettier.is | ||
.awesome( | ||
) | ||
</script> | ||
<template lang="unknown"> | ||
<prettier> | ||
awesome | ||
</prettier> | ||
</template> | ||
================================================================================ | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
run_spec(__dirname, ["vue"]); | ||
run_spec(__dirname, ["vue"], { vueIndentScriptAndStyle: true }); | ||
run_spec(__dirname, ["vue"], { embeddedLanguageFormatting: "off" }); |
Oops, something went wrong.