Remove trailing space for code blocks

This commit is contained in:
japborst
2022-09-27 16:49:02 +02:00
parent 9ae3c70dff
commit ec023cd8cf

View File

@@ -129,7 +129,8 @@ public final class BugPatternInstance {
sampleCode = StringEscapeUtils.unescapeJava(sampleCode);
try {
return FORMATTER.formatSource(sampleCode);
// Trim to remove trailing line-break.
return FORMATTER.formatSource(sampleCode).trim();
} catch (FormatterException e) {
e.printStackTrace();
return null;