Ensure paragraph quotes

This commit is contained in:
M66B
2020-08-12 16:31:50 +02:00
parent 0920c4ee2a
commit 6308069ce8
2 changed files with 11 additions and 7 deletions

View File

@@ -485,7 +485,8 @@ public class FragmentCompose extends FragmentBase {
if (activity != null)
activity.onUserInteraction();
if (before == 0 && count == 1 && start > 0 && text.charAt(start) == '\n') {
if (before == 0 && count == 1 && start > 0 &&
text.charAt(start) == '\n' && text.charAt(start - 1) == '\n') {
// break block quotes
boolean qbroken = false;
SpannableStringBuilder ssb = new SpannableStringBuilder(text);
@@ -493,7 +494,7 @@ public class FragmentCompose extends FragmentBase {
for (QuoteSpan span : spans) {
int s = ssb.getSpanStart(span);
int e = ssb.getSpanEnd(span);
int f = ssb.getSpanFlags(span);
int f = ssb.getSpanFlags(span) | Spanned.SPAN_PARAGRAPH;
Log.i("Span " + s + "..." + e + " start=" + start);
if (s > 0 && start - s > 0 && e - (start + 1) > 0 &&