1
0
mirror of https://github.com/octoleo/plantuml-server.git synced 2024-06-02 08:30:48 +00:00

Code formatting

This commit is contained in:
Arnaud Roques 2022-01-22 13:07:01 +01:00
parent 494dfba063
commit b995dcdb61

View File

@ -84,26 +84,26 @@ public class PlantUmlServlet extends HttpServlet {
final int length = string.length();
for (int offset = 0; offset < length; ) {
final int c = string.codePointAt(offset);
if (c == ' ')
if (c == ' ') {
sb.append(' ');
else if (c == '"')
} else if (c == '"') {
sb.append("&quot;");
else if (c == '&')
} else if (c == '&') {
sb.append("&amp;");
else if (c == '<')
} else if (c == '<') {
sb.append("&lt;");
else if (c == '>')
} else if (c == '>') {
sb.append("&gt;");
else if (c == '\r')
} else if (c == '\r') {
sb.append("\r");
else if (c == '\n')
} else if (c == '\n') {
sb.append("\n");
else {
} else {
int ci = 0xffffff & c;
if (ci < 160)
if (ci < 160) {
// nothing special only 7 Bit
sb.append((char)c);
else {
} else {
// Not 7 Bit use the unicode system
sb.append("&#");
sb.append(ci);