Files
test-repo/changelog_unreleased/markdown/19908.md
T
fcaf991e7f Fix fenced code block in a JS templates (#19908)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
2026-09-07 12:17:22 +08:00

455 B

Fix fenced code block in a JS templates (#19908 by @Kjubikstronk)

// Input
const content = markdown`
\`\`\`js
markdown\`
    \\\`\\\`\\\`js
    console.log('hi');
    \\\`\\\`\\\`
\`
\`\`\`
`;

// Prettier stable
const content = markdown`
~~~js
markdown\`
  ~~~js
  console.log("hi");
  ~~~
\`;
~~~
`;

// Prettier main
const content = markdown`
~~~~js
markdown\`
  ~~~js
  console.log("hi");
  ~~~
\`;
~~~~
`;