Happens if the template literal initially doesn't contain line breaks.
Another issue about unstable template literals: #5885
HTML in JS
Prettier 1.17.1
Playground link
Input:
foo(/* HTML */ `<!-- bar1 --> bar <!-- bar2 -->`);
Output:
foo(
/* HTML */ `
<!-- bar1 -->
bar
<!-- bar2 -->
`
);
Second Output:
foo(/* HTML */ `
<!-- bar1 -->
bar
<!-- bar2 -->
`);
GraphQL in JS
Prettier 1.17.1
Playground link
Input:
foo(/* GraphQL */ `query { foo { bar } }`);
Output:
foo(
/* GraphQL */ `
query {
foo {
bar
}
}
`
);
Second Output:
foo(/* GraphQL */ `
query {
foo {
bar
}
}
`);
Happens if the template literal initially doesn't contain line breaks.
Another issue about unstable template literals: #5885
HTML in JS
Prettier 1.17.1
Playground link
Input:
Output:
Second Output:
GraphQL in JS
Prettier 1.17.1
Playground link
Input:
Output:
Second Output: