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

HubL inside of style="" attributes can break formatting #61

Open
1 task
anthmatic opened this issue Jan 30, 2023 · 0 comments
Open
1 task

HubL inside of style="" attributes can break formatting #61

anthmatic opened this issue Jan 30, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@anthmatic
Copy link
Contributor

Description

HubL inside of style="" attributes can break formatting

Expected behavior

Normal HTML prettier formatting

To Reproduce

Original Source Code:

<div
  style="
   {% if true %}
        background-image:url({{ module.background_settings.background_image_url.src }});
      {% else %}
    background-color: {{ module.background_settings.background_color.color }};
    {% endif %}
  "
>

Formatted Source Code:

<div
  style="
   {% if true %}
        background-image:url({{ module.background_settings.background_image_url.src }});
      {% else %}
    background-color: {{ module.background_settings.background_color.color }};
    {% endif %}
  "
>

Additional context

Potential Solution: new placeholder strategy https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAeAJgSwG4AIDOMAngDZwC8AOiAPQBUumAZrnTQEYCGYA1gOYAnCAFco6JLlzCBJABQByergAOJbnAAWEEujgDWNeQEoA3LkgkIAiUrD58Bk0oRYWbagD5UNLNg8gAGhAIZRhMaHxkUE4BIQB3AAUYhEiUThI4ziJIoPYBbh44GABlTgBbOAAZTCg4ZCZ0-Dhc-N4i4uVuGr5kGAFhZpA4MvY4dF10Ss4oPmFOPjgAMSsyzhgwmeQQTmEYCECQDRgykgB1DUx4fE6wOGKUy5xLoi27HJAapoEYBPy+VfqjUGACt8AAPYrdMgARWEEHggJITSCnQEXy2RxOB2UAhqMFOmHQMA0yAAHAAGFFCJqnfLKLY4uBfbB1IIARzh8F+IVS23wAFpamMxgcBHAOZgxb95gCkA0kYMmmVML1+oqoXBYfC6nKgUEYJx2ASiSSkAAmfX5TAkboAYQgZVlQ3wAFYDsImgAVQ2peXIkDYAYASTECBKYFxoQAgmJisQyIimgBfJNAA

Checklist

  • I have checked the known issues to make sure this isn’t already a known issue.
@anthmatic anthmatic added the bug Something isn't working label Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant