Try to fix superscript rendering.

This commit is contained in:
Alex Ning 2021-02-22 23:44:35 +08:00
parent fea59bc66d
commit 73ddafdfcc

View File

@ -99,9 +99,13 @@ public class Utils {
} }
} else if (currentChar == ' ' || currentChar == '\n') { } else if (currentChar == ' ' || currentChar == '\n') {
if (newestCaretIndex >= 0) { if (newestCaretIndex >= 0) {
regexed.insert(i, '^'); if (i != newestCaretIndex + 1) {
newestCaretIndex = -1; regexed.insert(i, '^');
i++; newestCaretIndex = -1;
i++;
} else {
newestCaretIndex = -1;
}
} }
} else if (currentChar == '(') { } else if (currentChar == '(') {
if (newestCaretIndex >= 0 && i == newestCaretIndex + 1) { if (newestCaretIndex >= 0 && i == newestCaretIndex + 1) {