Skip to content

Commit e30bd02

Browse files
committed
refactor(clish.cmd): dont trim input, use writer instead of echo
1 parent c82c585 commit e30bd02

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Console/ClishCommand.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,8 @@ public function interact(Interactor $io)
6666
public function execute()
6767
{
6868
$code = $this->file ? \file_get_contents($this->file) : $this->code;
69-
$code = \trim($code);
7069

71-
if ('' === $code) {
70+
if ('' === \trim($code)) {
7271
return;
7372
}
7473

@@ -79,7 +78,7 @@ public function execute()
7978
protected function doHighlight(string $code = null)
8079
{
8180
if (!$this->output || $this->echo) {
82-
echo new Highlighter($code);
81+
$this->app()->io()->raw((string) new Highlighter($code));
8382
}
8483
}
8584

0 commit comments

Comments
 (0)