From a6d1559755e107e7d8b72e66b9b61856d7f7fa0f Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 10 Nov 2017 20:19:22 +0100 Subject: [PATCH] styler: ignore closing keyword when preceded by whitespace --- src/main/java/eu/siacs/conversations/utils/ImStyleParser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/utils/ImStyleParser.java b/src/main/java/eu/siacs/conversations/utils/ImStyleParser.java index 893b925fc..aa1ac2d83 100644 --- a/src/main/java/eu/siacs/conversations/utils/ImStyleParser.java +++ b/src/main/java/eu/siacs/conversations/utils/ImStyleParser.java @@ -86,7 +86,7 @@ public class ImStyleParser { private static int seekEnd(CharSequence text, char needle, int start, int end) { for (int i = start; i <= end; ++i) { char c = text.charAt(i); - if (c == needle) { + if (c == needle && !precededByWhiteSpace(text,i,start)) { return i; } else if (c == '\n') { return -1;