From d8f94f391dce0c7c74b49141c389315742070acc Mon Sep 17 00:00:00 2001 From: Bill Collins Date: Tue, 9 Feb 2021 21:38:18 +0000 Subject: [PATCH] Ensure double-newlines between summaries (#80) --- .../jenkins/plugins/checks/status/FlowExecutionAnalyzer.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/jenkins/plugins/checks/status/FlowExecutionAnalyzer.java b/src/main/java/io/jenkins/plugins/checks/status/FlowExecutionAnalyzer.java index 0e970352..629ae8d2 100644 --- a/src/main/java/io/jenkins/plugins/checks/status/FlowExecutionAnalyzer.java +++ b/src/main/java/io/jenkins/plugins/checks/status/FlowExecutionAnalyzer.java @@ -118,16 +118,17 @@ private Pair processErrorOrWarningRow(final FlowGraphTable.Row r nodeTextBuilder.append(String.format("**Error**: *%s*", errorAction.getDisplayName())); String log = getLog(flowNode); if (StringUtils.isNotBlank(log)) { - nodeSummaryBuilder.append(String.format("```%n%s%n```%n
%nBuild log%n%n```%n%s%n```%n
%n", + nodeSummaryBuilder.append(String.format("```%n%s%n```%n
%nBuild log%n%n```%n%s%n```%n
", errorAction.getDisplayName(), log)); } } else { nodeTextBuilder.append(String.format("**Unstable**: *%s*", warningAction.getMessage())); - nodeSummaryBuilder.append(String.format("```%n%s%n```%n%n", warningAction.getMessage())); + nodeSummaryBuilder.append(String.format("```%n%s%n```", warningAction.getMessage())); } nodeTextBuilder.append("\n"); + nodeSummaryBuilder.append("\n\n"); // Ensure a double newline at the end of summary so the subsequence heading works return Pair.of(nodeTextBuilder.toString(), nodeSummaryBuilder.toString()); }