Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

prettier-ignore-start and prettier-ignore-end not working. #107

Closed
andershagbard opened this issue Nov 1, 2022 · 3 comments
Closed

prettier-ignore-start and prettier-ignore-end not working. #107

andershagbard opened this issue Nov 1, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@andershagbard
Copy link

Describe the bug
prettier-ignore-start and prettier-ignore-end not working.

Unformatted source

{% # prettier-ignore-start %}
My unformatted code
{% # prettier-ignore-end %}

Expected output

{% # prettier-ignore-start %}
My unformatted code
{% # prettier-ignore-end %}

Actual output

{% # prettier-ignore-start %}
My formatted code
{% # prettier-ignore-end %}

Debugging information

  • OS Mac
  • Version 0.4.0
@andershagbard andershagbard added the bug Something isn't working label Nov 1, 2022
@charlespwd
Copy link
Collaborator

charlespwd commented Nov 1, 2022

We do support {% # prettier-ignore %} (https://github.com/Shopify/prettier-plugin-liquid/pull/85/files#diff-69ea62ee3501b3b2b0862c6a264b7150ebad65db4c33d049510bcff099ba3fef) and it will target the next "node."

Is <!-- prettier-ignore-start --> something we can do in prettier-html? Something we'd have to look into.

@charlespwd
Copy link
Collaborator

From their docs it looks like the syntax only supports targeting the next node:
https://prettier.io/docs/en/ignore.html#html

@andershagbard
Copy link
Author

I may have overlooked that start/end is only for markdown. I don't think it should be implemented then.

prettier/prettier#5287

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants