XEP-0393: fix off-by-one error in block detector ('``ii``ii')

This commit is contained in:
Georg Lukas 2017-12-07 13:45:37 +01:00 committed by Daniel Gultsch
parent 328c6dea0f
commit d96180f0ee
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ public class ImStyleParser {
}
private static boolean isCharRepeatedTwoTimes(CharSequence text, char c, int index, int end) {
return index + 1 <= end && text.charAt(index) == c && text.charAt(index) == c;
return index + 1 <= end && text.charAt(index) == c && text.charAt(index+1) == c;
}
private static boolean precededByWhiteSpace(CharSequence text, int index, int start) {