forked from trivago/prettier-plugin-twig-melody
-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'GH-90/bracket-same-line' into master
Close GH-90 Fix missing implementation for option `bracketSameLine` for html tags. If you don't have this option on your prettier configuration you need to add it to retain your current code style. Add this configuration to retain current code style. ```yaml bracketSameLine: true ``` Otherwise closing bracket for opening tag will be printed on new line. __Previous default__ ```twig <a href="/some/url"> text </a> ``` __Current default__ ```twig <a href="/some/url" > text </a> ```
- Loading branch information
Showing
17 changed files
with
188 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
{% for foo in range(1, category) %} | ||
<span | ||
key="{{ foo }}" | ||
class="qtp-item__star icon-ic icon-icn_star--white {{ foo }}"> | ||
class="qtp-item__star icon-ic icon-icn_star--white {{ foo }}" | ||
> | ||
{% include './Star.twig' only %} | ||
</span> | ||
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
attr5="five" | ||
attr6="six" | ||
attr7="seven" | ||
attr8="eight"> | ||
attr8="eight" | ||
> | ||
Text | ||
</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,4 +68,5 @@ | |
theme | ||
}) | ||
}) | ||
}}></div> | ||
}} | ||
></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
tests/Options/__snapshots__/bracket_same_line_disabled.snap.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<iframe | ||
class="" | ||
src="https://www.google.com/maps/embed" | ||
frameborder="0" | ||
allowfullscreen | ||
></iframe> | ||
|
||
<img | ||
src="/public/logo.png" | ||
alt="some description that should be enough to break this into multiline" | ||
class="block bg-white border radius-lg" | ||
/> | ||
<img src="/public/logo.png" class="block bg-white border radius-lg" /> | ||
<a | ||
href="/homepage" | ||
class="block bg-white border radius-lg" | ||
aria-label="some text label" | ||
> | ||
some text | ||
</a> | ||
|
||
<br /> |
19 changes: 19 additions & 0 deletions
19
tests/Options/__snapshots__/bracket_same_line_enabled.snap.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<iframe | ||
class="" | ||
src="https://www.google.com/maps/embed" | ||
frameborder="0" | ||
allowfullscreen></iframe> | ||
|
||
<img | ||
src="/public/logo.png" | ||
alt="some description that should be enough to break this into multiline" | ||
class="block bg-white border radius-lg" /> | ||
<img src="/public/logo.png" class="block bg-white border radius-lg" /> | ||
<a | ||
href="/homepage" | ||
class="block bg-white border radius-lg" | ||
aria-label="some text label"> | ||
some text | ||
</a> | ||
|
||
<br /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<iframe class="" | ||
src="https://www.google.com/maps/embed" | ||
frameborder="0" | ||
allowfullscreen></iframe> | ||
|
||
<img src="/public/logo.png" alt="some description that should be enough to break this into multiline" class="block bg-white border radius-lg"/> | ||
<img src="/public/logo.png" class="block bg-white border radius-lg"/> | ||
<a href="/homepage" class="block bg-white border radius-lg" aria-label="some text label">some text</a> | ||
|
||
<br /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters