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 22
33## Unreleased
44
5+ ## 0.5.9 - 2022-01-19
6+
7+ ### Fixed
8+
9+ - Fix cosmetic trailing space issue
10+
511## 0.5.8 - 2022-01-19
612
713### Added
Original file line number Diff line number Diff line change @@ -200,7 +200,9 @@ public function attrsAsString()
200200 $ attrs [] = "$ key= \"$ value \"" ;
201201 }
202202
203- return implode (' ' , $ attrs ) . ' ' ;
203+ if (count ($ attrs )) {
204+ return implode (' ' , $ attrs ) . ' ' ;
205+ }
204206 }
205207
206208 /**
Original file line number Diff line number Diff line change @@ -88,6 +88,25 @@ public function it_sends_a_simple_request_with_style()
8888 );
8989 }
9090
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+
91110 /** @test */
92111 public function classes_get_merged ()
93112 {
You can’t perform that action at this time.
0 commit comments