HttpPluginServlet: Don't trim leading whitespace from about.md content

Trimming leading whitespace prevents preformatted code blocks from
being rendered properly.

Change-Id: I97f0fab63d128a11320cabe9e13ff5b6e80fc139
This commit is contained in:
David Pursehouse
2018-05-17 14:23:35 +09:00
parent 7d1dfc7bc7
commit fcbdca1e30
2 changed files with 3 additions and 1 deletions

View File

@@ -40,6 +40,7 @@ java_library(
"//lib:soy",
"//lib/auto:auto-value",
"//lib/commons:codec",
"//lib/commons:lang",
"//lib/guice",
"//lib/guice:guice-assistedinject",
"//lib/guice:guice-servlet",

View File

@@ -87,6 +87,7 @@ import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang.StringUtils;
import org.eclipse.jgit.lib.Config;
import org.eclipse.jgit.util.IO;
import org.eclipse.jgit.util.RawParseUtils;
@@ -477,7 +478,7 @@ class HttpPluginServlet extends HttpServlet implements StartPluginListener, Relo
try (BufferedReader reader = new BufferedReader(isr)) {
String line;
while ((line = reader.readLine()) != null) {
line = line.trim();
line = StringUtils.stripEnd(line, null);
if (line.isEmpty()) {
aboutContent.append("\n");
} else {