withastro / prettier-plugin-astro

Prettier plugin for Astro
Other
484 stars 36 forks source link

🐛 BUG: prettier-ignore breaks file #420

Closed hyperknot closed 5 months ago

hyperknot commented 5 months ago

Describe the Bug

<!-- prettier-ignore -->
{
  showStyleURL && (
    <pre id="style-url-pre">
      <code id="style-url-code">https://tiles.openfreemap.org/styles/liberty</code>
    </pre>
  )
}

<script is:inline src="https://unpkg.com/maplibre-gl/dist/maplibre-gl.js"></script>

gets reformatted into:

<!-- prettier-ignore -->
{
  showStyleURL && (
    <pre id="style-url-pre">
      <code id="style-url-code">https://tiles.openfreemap.org/styles/liberty</code>
    </pre>
  )
}

script is:inline src="https://unpkg.com/maplibre-gl/dist/maplibre-gl.js"></script>

(emphasis is on last lines missing < tag)

Steps to Reproduce

check snippet

Princesseuh commented 5 months ago

Duplicate of https://github.com/withastro/prettier-plugin-astro/issues/338

(The root cause is the same, even if that issue showcase a different situation)