From d80704643a0647a3b34ce2a8201dd133f62e8987 Mon Sep 17 00:00:00 2001 From: Boming Zhang Date: Wed, 9 Oct 2024 05:36:12 -0400 Subject: [PATCH] feat(parser/diff): remove diff output suffix --- internal/parsers/diff/parser.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/parsers/diff/parser.go b/internal/parsers/diff/parser.go index 9b45e33..3c86b3c 100644 --- a/internal/parsers/diff/parser.go +++ b/internal/parsers/diff/parser.go @@ -87,8 +87,9 @@ func (*Diff) Run(results []stage.ExecutorResult, confAny any) ( // Generate diff block with surrounding context diffOutput := generateDiffWithContext( stdoutLines, resultLines, diffOps) + diffOutput = strings.TrimSuffix(diffOutput, "\n \n") comment += fmt.Sprintf( - "```diff\n%s```\n", + "```diff\n%s\n```\n", diffOutput, ) }