File tree Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## Unreleased
4
4
5
+ ## 0.5.9 - 2022-01-19
6
+
7
+ ### Fixed
8
+
9
+ - Fix cosmetic trailing space issue
10
+
5
11
## 0.5.8 - 2022-01-19
6
12
7
13
### Added
Original file line number Diff line number Diff line change @@ -200,7 +200,9 @@ public function attrsAsString()
200
200
$ attrs [] = "$ key= \"$ value \"" ;
201
201
}
202
202
203
- return implode (' ' , $ attrs ) . ' ' ;
203
+ if (count ($ attrs )) {
204
+ return implode (' ' , $ attrs ) . ' ' ;
205
+ }
204
206
}
205
207
206
208
/**
Original file line number Diff line number Diff line change @@ -88,6 +88,25 @@ public function it_sends_a_simple_request_with_style()
88
88
);
89
89
}
90
90
91
+ /** @test */
92
+ public function no_attrs_no_trailing_space ()
93
+ {
94
+ $ this ->fakeSuccessfulResponse ('component ' , [
95
+ 'classes ' => 'torchlight ' ,
96
+ 'styles ' => 'background-color: #292D3E; ' ,
97
+ 'highlighted ' => 'this is the highlighted response from the server ' ,
98
+ 'attrs ' => []
99
+ ]);
100
+
101
+ $ response = $ this ->getView ('simple-php-hello-world-with-style.blade.php ' );
102
+
103
+ $ this ->assertEquals (
104
+ '<pre><code class="torchlight" style="display: none;background-color: #292D3E;">this is the highlighted response from the server</code></pre> ' ,
105
+ $ response ->content ()
106
+ );
107
+ }
108
+
109
+
91
110
/** @test */
92
111
public function classes_get_merged ()
93
112
{
You can’t perform that action at this time.
0 commit comments