styler: ignore closing keyword when preceded by whitespace

This commit is contained in:
Daniel Gultsch 2017-11-10 20:19:22 +01:00
parent 513795fdf8
commit a6d1559755

View file

@ -86,7 +86,7 @@ public class ImStyleParser {
private static int seekEnd(CharSequence text, char needle, int start, int end) { private static int seekEnd(CharSequence text, char needle, int start, int end) {
for (int i = start; i <= end; ++i) { for (int i = start; i <= end; ++i) {
char c = text.charAt(i); char c = text.charAt(i);
if (c == needle) { if (c == needle && !precededByWhiteSpace(text,i,start)) {
return i; return i;
} else if (c == '\n') { } else if (c == '\n') {
return -1; return -1;