Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatter ignores liquid quotes inside HTML attributes #264

Open
mc-0bit opened this issue Jan 11, 2024 · 1 comment
Open

Formatter ignores liquid quotes inside HTML attributes #264

mc-0bit opened this issue Jan 11, 2024 · 1 comment
Labels
Bug Something isn't working open for contributions theme bugs that won't be prioritized in the near future

Comments

@mc-0bit
Copy link

mc-0bit commented Jan 11, 2024

Describe the bug
Formatter ignores liquid quotes inside HTML attributes with liquidSingleQuote enabled.

Source

<div class="{{ "test" }}"></div>

Expected behaviour

<div class="{{ 'test' }}"></div>

Actual behaviour

<div class="{{ "test" }}"></div>

Debugging information

  • @shopify/prettier-plugin-liquid@1.4.1

Additional context
image

@charlespwd charlespwd added Bug Something isn't working action-item and removed action-item labels Jan 11, 2024
@charlespwd
Copy link
Contributor

Ah yes that's because we decided a long time ago to not reformat the contents of HTML attributes for fear of breaking things. IIRC we might be pasting those as is. We should be smarter than this indeed.

@mgmanzella mgmanzella added the open for contributions theme bugs that won't be prioritized in the near future label Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working open for contributions theme bugs that won't be prioritized in the near future
Projects
None yet
Development

No branches or pull requests

3 participants