From b678968f69a3892d87f130113a545b842f403f08 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sat, 12 Feb 2022 14:32:35 +0100 Subject: [PATCH] Make editor links clickable for terminals supporting hrefs --- src/Command/ErrorFormatter/TableErrorFormatter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Command/ErrorFormatter/TableErrorFormatter.php b/src/Command/ErrorFormatter/TableErrorFormatter.php index 4352aed7a6..4c8f79c6c1 100644 --- a/src/Command/ErrorFormatter/TableErrorFormatter.php +++ b/src/Command/ErrorFormatter/TableErrorFormatter.php @@ -74,7 +74,8 @@ public function formatErrors( $message .= "\n💡 " . $tip; } if (is_string($this->editorUrl)) { - $message .= "\n✏️ " . str_replace(['%file%', '%line%'], [$error->getTraitFilePath() ?? $error->getFilePath(), (string) $error->getLine()], $this->editorUrl); + $url = str_replace(['%file%', '%line%'], [$error->getTraitFilePath() ?? $error->getFilePath(), (string) $error->getLine()], $this->editorUrl); + $message .= "\n✏️ ' . $url . ''; } $rows[] = [ (string) $error->getLine(),