Skip to content

Commit

Permalink
Fix new lines in summary.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhafner committed Sep 26, 2024
1 parent 6e2d086 commit bb0541c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/main/java/edu/hm/hafner/grading/GradingReport.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ public String getMarkdownSummary(final AggregatedScore score) {
* @return Markdown text
*/
public String getMarkdownSummary(final AggregatedScore score, final String title) {
return createMarkdownTotal(score, title, 3) + getSubScoreDetails(score) + HORIZONTAL_RULE;
return createMarkdownTotal(score, title, 3) + PARAGRAPH + getSubScoreDetails(score) + HORIZONTAL_RULE;
}

private String createPercentage(final AggregatedScore score) {
if (score.getMaxScore() == 0) {
return StringUtils.EMPTY;
}
return ScoreMarkdown.getPercentageImage("Score percentage", score.getAchievedPercentage());
return ScoreMarkdown.getPercentageImage("Score percentage", score.getAchievedPercentage()) + PARAGRAPH;
}

/**
Expand All @@ -90,7 +90,7 @@ private String createPercentage(final AggregatedScore score) {
public StringBuilder getSubScoreDetails(final AggregatedScore score) {
var summary = new StringBuilder();

summary.append(createPercentage(score)).append(PARAGRAPH);
summary.append(createPercentage(score));

if (score.hasTests()) {
summary.append(TEST_MARKDOWN.createSummary(score));
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/edu/hm/hafner/grading/ScoreMarkdown.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
abstract class ScoreMarkdown<S extends Score<S, C>, C extends Configuration> {
protected static final int ICON_SIZE = 18;
static final String SPACE = "&nbsp;";
static final String LINE_BREAK = "\n";
static final String LINE_BREAK = "\\\n";
static final String LEDGER = ":heavy_minus_sign:";
static final String IMPACT = ":moneybag:";
static final String TOTAL = ":heavy_minus_sign:";
Expand Down

0 comments on commit bb0541c

Please sign in to comment.