Don't try to change ".md" extension to ".html"
On Gerrit's HttpPluginServlet, we can handle both ".md" and ".html" extensions just fine with ".md" source files. In the mean time, gitiles can only handle the actual extensions (".md"). So in order to not break gitiles, we should encourage plugin developers to use ".md" extension in the links in their docs, instead of ".html". But currently in the auto generated "index.html", we list all the ".md" file in plugin and change their extensions to ".html". This is a bad example and will actually encourage plugin developers to use ".html" extension. So let's stop doing that. Eventually we would want to change all the links in all the plugins' docs back to ".md" to unbreak gitiles. But that will be in separated changes. Change-Id: I056259c148ade92dcd387092665afe81c438ec1d
This commit is contained in:
@@ -359,7 +359,6 @@ class HttpPluginServlet extends HttpServlet
|
|||||||
if (Strings.isNullOrEmpty(entryTitle)) {
|
if (Strings.isNullOrEmpty(entryTitle)) {
|
||||||
entryTitle = rsrc.substring(nameOffset, rsrc.length() - 3).replace('-', ' ');
|
entryTitle = rsrc.substring(nameOffset, rsrc.length() - 3).replace('-', ' ');
|
||||||
}
|
}
|
||||||
rsrc = rsrc.substring(0, rsrc.length() - 3) + ".html";
|
|
||||||
} else {
|
} else {
|
||||||
entryTitle = rsrc.substring(nameOffset).replace('-', ' ');
|
entryTitle = rsrc.substring(nameOffset).replace('-', ' ');
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user