Skip to content

Commit

Permalink
fix: πŸ› new line inserted at end of style tag
Browse files Browse the repository at this point in the history
  • Loading branch information
shufo committed Jun 4, 2022
1 parent 3a7e540 commit 4634794
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion __tests__/fixtures/formatted.append_tag.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
text-decoration: underline !important;
}
</style>
@append
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
.original-image-tag {
white-space: nowrap;
}
</style>
<script>
$('.original-image-input').on('change', handleUpload);
Expand Down
1 change: 0 additions & 1 deletion __tests__/fixtures/formatted.overwrite_tag.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
text-decoration: underline !important;
}
</style>
@overwrite
</div>
1 change: 0 additions & 1 deletion __tests__/fixtures/formatted_shorttag.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,6 @@
a.status-1 {
font-weight: bold;
}
</style>
<script>
jQuery(document).ready(function($) {
Expand Down
1 change: 0 additions & 1 deletion __tests__/formatter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3813,7 +3813,6 @@ describe('formatter', () => {
` padding-bottom: 20px !important;`,
` }`,
` }`,
``,
` </style>`,
`@endsection`,
``,
Expand Down
3 changes: 3 additions & 0 deletions src/formatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ export default class Formatter {
wrap_line_length: util.optional(this.options).wrapLineLength || 120,
wrap_attributes: util.optional(this.options).wrapAttributes || 'auto',
end_with_newline: util.optional(this.options).endWithNewline || true,
css: {
end_with_newline: false,
},
};

const promise = new Promise((resolve) => resolve(data))
Expand Down

0 comments on commit 4634794

Please sign in to comment.