Fix git omitting half of the changes

This commit is contained in:
Sebi
2020-05-08 15:48:36 +02:00
parent aab880e437
commit dda1c6fb0a
2 changed files with 53 additions and 58 deletions
+44 -22
View File
@@ -6,28 +6,50 @@ public interface StringParser {
public Object parse(String line);
public static StringParser cmdParser() {
return new StringParser() {
@Override
public Object parse(String line) {
line = P.p.color(line);
int plus = 0;
if (line.startsWith("+++")) {
plus = 3;
line = line.substring(3);
} else if (line.startsWith("++")) {
plus = 2;
line = line.substring(2);
} else if (line.startsWith("+")) {
plus = 1;
line = line.substring(1);
}
if (line.startsWith("/")) {
line = line.substring(1);
}
return new Tuple<>(plus, line);
public static StringParser cmdParser = new StringParser() {
@Override
public Object parse(String line) {
line = P.p.color(line);
int plus = 0;
if (line.startsWith("+++")) {
plus = 3;
line = line.substring(3);
} else if (line.startsWith("++")) {
plus = 2;
line = line.substring(2);
} else if (line.startsWith("+")) {
plus = 1;
line = line.substring(1);
}
};
}
if (line.startsWith("/")) {
line = line.substring(1);
}
return new Tuple<Integer,String>(plus, line);
}
};
public static StringParser loreParser = new StringParser() {
@Override
public Object parse(String line) {
line = P.p.color(line);
int plus = 0;
if (line.startsWith("+++")) {
plus = 3;
line = line.substring(3);
} else if (line.startsWith("++")) {
plus = 2;
line = line.substring(2);
} else if (line.startsWith("+")) {
plus = 1;
line = line.substring(1);
}
if (line.startsWith(" ")) {
line = line.substring(1);
}
if (!line.startsWith("§")) {
line = "§9" + line;
}
return new Tuple<Integer,String>(plus, line);
}
};
}