mirror of
https://github.com/hanzoai/prettier.git
synced 2026-09-24 17:02:04 +00:00
35 lines
839 B
JavaScript
35 lines
839 B
JavaScript
import { outdent } from "outdent";
|
|
|
|
const fixtures = {
|
|
importMeta: import.meta,
|
|
snippets: [
|
|
{
|
|
name: "Preserve trailing double spaces in JSDoc",
|
|
code: outdent`
|
|
<script>
|
|
function foo
|
|
(
|
|
uglyParameter,
|
|
toEnsure, thisCode,
|
|
isFormatted, byJsParser) {
|
|
/**
|
|
* Should not break when html parser add indention.${" ".repeat(2)}
|
|
*/
|
|
}
|
|
</script>
|
|
`,
|
|
output: outdent`
|
|
<script>
|
|
function foo(uglyParameter, toEnsure, thisCode, isFormatted, byJsParser) {
|
|
/**
|
|
* Should not break when html parser add indention.${" ".repeat(2)}
|
|
*/
|
|
}
|
|
</script>\n
|
|
`,
|
|
},
|
|
],
|
|
};
|
|
|
|
runFormatTest(fixtures, ["vue"], { vueIndentScriptAndStyle: true });
|