DeepL: prevent extra newline

pull/199/head
M66B 4 years ago
parent 54c9fbaa16
commit ac9f83241c

@ -2024,7 +2024,7 @@ public class FragmentCompose extends FragmentBase {
// Insert translated text // Insert translated text
StringBuilder sb = new StringBuilder("\n"); StringBuilder sb = new StringBuilder("\n");
if (paragraph.second == edit.length() || if (paragraph.second != edit.length() &&
edit.charAt(paragraph.second) != '\n') edit.charAt(paragraph.second) != '\n')
sb.append('\n'); sb.append('\n');
edit.insert(paragraph.second, sb + translated); edit.insert(paragraph.second, sb + translated);

Loading…
Cancel
Save