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

Bugfix: Fix html attribute indentation when printed on multiline #100

Merged
merged 1 commit into from
Dec 8, 2024

Conversation

zackad
Copy link
Owner

@zackad zackad commented Dec 8, 2024

This is how prettier handle multiline html attribute.

Input

<iframe class=""
    src="https://www.google.com/maps/embed"
    frameborder="0"
    allowfullscreen></iframe>

Output

- <iframe class=""
+ <iframe
+     class=""
      src="https://www.google.com/maps/embed"
      frameborder="0"
      allowfullscreen></iframe>

@zackad zackad added Printer Logic related on how to print the output Bugfix labels Dec 8, 2024
@zackad zackad force-pushed the fix-indentation branch 3 times, most recently from 44beb8d to c2a9c7d Compare December 8, 2024 03:33
@zackad zackad requested a review from rellafella December 8, 2024 03:35
Copy link
Collaborator

@rellafella rellafella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good!

__Input__
```twig
<iframe class=""
        src="https://www.google.com/maps/embed"
        frameborder="0"
        allowfullscreen></iframe>
```

__Output__
```diff
- <iframe class=""
+ <iframe
+     class=""
      src="https://www.google.com/maps/embed"
      frameborder="0"
      allowfullscreen></iframe>
```
@zackad zackad merged commit 35d0537 into master Dec 8, 2024
3 checks passed
@zackad zackad deleted the fix-indentation branch December 8, 2024 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix Printer Logic related on how to print the output
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants