Minor Ipnb: make condition more readable

This commit is contained in:
Valentina Kiryushkina
2016-10-20 19:57:02 +03:00
parent 43119c45b3
commit 357ee4e52f
@@ -147,7 +147,7 @@ public class IpnbJfxUtils {
int start = 0;
boolean single;
int end = StringUtil.indexOf(source, "$");
single = !(source.length() > end + 1 && source.charAt(end + 1) == '$');
single = end + 1 >= source.length() || source.charAt(end + 1) != '$';
while (end > 0) {
String substring = source.substring(start, end);
if (start != 0) {
@@ -156,7 +156,7 @@ public class IpnbJfxUtils {
result.append(substring);
inMath = !inMath;
single = !(source.length() > end + 1 && source.charAt(end + 1) == '$');
single = end + 1 >= source.length() || source.charAt(end + 1) != '$';
start = end + (single ? 1 : 2);
end = StringUtil.indexOf(source, "$", start);
}