From fd6f74f2ee943568cae910aff864cb2c309ebca3 Mon Sep 17 00:00:00 2001 From: Manuel Fuchs Date: Fri, 20 Dec 2024 13:20:10 +0100 Subject: [PATCH] Fix style for Url and Command --- shared/src/output.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/shared/src/output.rs b/shared/src/output.rs index e94a37b..526bdf4 100644 --- a/shared/src/output.rs +++ b/shared/src/output.rs @@ -154,13 +154,15 @@ impl BuildpackOutputText { match section { BuildpackOutputTextSection::Regular(_) => {} BuildpackOutputTextSection::Value(_) => { - result.push_str(ANSI_VALUE_CODE); result.push(VALUE_DELIMITER_CHAR); + result.push_str(ANSI_VALUE_CODE); } BuildpackOutputTextSection::Url(_) => { + result.push(VALUE_DELIMITER_CHAR); result.push_str(ANSI_URL_CODE); } BuildpackOutputTextSection::Command(_) => { + result.push(VALUE_DELIMITER_CHAR); result.push_str(ANSI_COMMAND_CODE); } } @@ -175,8 +177,13 @@ impl BuildpackOutputText { result.push_str(&line_start); - if let BuildpackOutputTextSection::Value(_) = section { - result.push_str(ANSI_VALUE_CODE); + match section { + BuildpackOutputTextSection::Value(_) + | BuildpackOutputTextSection::Url(_) + | BuildpackOutputTextSection::Command(_) => { + result.push_str(ANSI_VALUE_CODE); + } + BuildpackOutputTextSection::Regular(_) => {} } } else { result.push(char);