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:
@@ -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",
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user