-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(feat) Support range ignores in HTML top level (#226)
`<!-- prettier-ignore-start --> ... <!-- prettier-ignore-end -->` is now supported at HTML top level Closes #225
- Loading branch information
1 parent
9d1486e
commit bb132d9
Showing
12 changed files
with
236 additions
and
16 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
23 changes: 23 additions & 0 deletions
23
test/formatting/samples/prettier-ignore-range-1/input.html
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,23 @@ | ||
<script> | ||
const a = true; | ||
</script> | ||
|
||
<div> | ||
|
||
I need to adhere sadly</div> | ||
|
||
<!-- prettier-ignore-start --> | ||
|
||
<div > format madness here </div> | ||
|
||
<p> | ||
I'm | ||
freeeee! | ||
</p> | ||
|
||
<!-- prettier-ignore-end --> | ||
|
||
<div>I need to adhere sadly | ||
|
||
|
||
</div> |
18 changes: 18 additions & 0 deletions
18
test/formatting/samples/prettier-ignore-range-1/output.html
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,18 @@ | ||
<script> | ||
const a = true; | ||
</script> | ||
|
||
<div>I need to adhere sadly</div> | ||
|
||
<!-- prettier-ignore-start --> | ||
|
||
<div > format madness here </div> | ||
|
||
<p> | ||
I'm | ||
freeeee! | ||
</p> | ||
|
||
<!-- prettier-ignore-end --> | ||
|
||
<div>I need to adhere sadly</div> |
17 changes: 17 additions & 0 deletions
17
test/formatting/samples/prettier-ignore-range-2/input.html
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,17 @@ | ||
<div> | ||
|
||
I need to adhere sadly</div> | ||
|
||
<!-- prettier-ignore-start --> | ||
|
||
<div > format madness here </div> | ||
|
||
<p> | ||
I'm | ||
freeeee! | ||
</p> | ||
|
||
<!-- prettier-ignore-end --> | ||
<script> | ||
const a = true; | ||
</script> |
16 changes: 16 additions & 0 deletions
16
test/formatting/samples/prettier-ignore-range-2/output.html
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,16 @@ | ||
<script> | ||
const a = true; | ||
</script> | ||
|
||
<div>I need to adhere sadly</div> | ||
|
||
<!-- prettier-ignore-start --> | ||
|
||
<div > format madness here </div> | ||
|
||
<p> | ||
I'm | ||
freeeee! | ||
</p> | ||
|
||
<!-- prettier-ignore-end --> |
14 changes: 14 additions & 0 deletions
14
test/formatting/samples/prettier-ignore-range-wrong/input.html
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,14 @@ | ||
<div> | ||
<!-- prettier-ignore-start --> | ||
|
||
<div > no format madness here </div> | ||
|
||
<p> | ||
no | ||
toplevel | ||
</p> | ||
|
||
<!-- prettier-ignore-end --> | ||
</div> | ||
|
||
<div>We all need to adhere sadly</div> |
11 changes: 11 additions & 0 deletions
11
test/formatting/samples/prettier-ignore-range-wrong/output.html
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,11 @@ | ||
<div> | ||
<!-- prettier-ignore-start --> | ||
|
||
<div>no format madness here</div> | ||
|
||
<p>no toplevel</p> | ||
|
||
<!-- prettier-ignore-end --> | ||
</div> | ||
|
||
<div>We all need to adhere sadly</div> |
40 changes: 40 additions & 0 deletions
40
test/formatting/samples/prettier-ignore-ranges-and-lines/input.html
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,40 @@ | ||
<div> | ||
|
||
I need to adhere sadly</div> | ||
|
||
<!-- prettier-ignore-start --> | ||
|
||
<div > format madness here </div> | ||
|
||
<p> | ||
I'm | ||
freeeee! | ||
</p> | ||
|
||
<!-- prettier-ignore-end --> | ||
|
||
<div>I need to adhere sadly | ||
|
||
|
||
</div> | ||
|
||
<!-- prettier-ignore-start --> | ||
|
||
<div > format madness here </div> | ||
|
||
<p> | ||
I'm | ||
freeeee! | ||
</p> | ||
|
||
<!-- prettier-ignore-end --> | ||
|
||
<!-- prettier-ignore --> | ||
<p> | ||
I'm | ||
freeeee! | ||
</p> | ||
<div>I need to adhere sadly | ||
|
||
|
||
</div> |
32 changes: 32 additions & 0 deletions
32
test/formatting/samples/prettier-ignore-ranges-and-lines/output.html
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,32 @@ | ||
<div>I need to adhere sadly</div> | ||
|
||
<!-- prettier-ignore-start --> | ||
|
||
<div > format madness here </div> | ||
|
||
<p> | ||
I'm | ||
freeeee! | ||
</p> | ||
|
||
<!-- prettier-ignore-end --> | ||
|
||
<div>I need to adhere sadly</div> | ||
|
||
<!-- prettier-ignore-start --> | ||
|
||
<div > format madness here </div> | ||
|
||
<p> | ||
I'm | ||
freeeee! | ||
</p> | ||
|
||
<!-- prettier-ignore-end --> | ||
|
||
<!-- prettier-ignore --> | ||
<p> | ||
I'm | ||
freeeee! | ||
</p> | ||
<div>I need to adhere sadly</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<script> | ||
const a = true; | ||
</script> | ||
|
||
<div>I need to adhere sadly</div> | ||
|
||
<!-- prettier-ignore-start --> | ||
|
||
<div > format madness here </div> | ||
|
||
<p> | ||
I'm | ||
freeeee! | ||
</p> | ||
|
||
<!-- prettier-ignore-end --> | ||
|
||
<div>I need to adhere sadly</div> |