Skip to content

Conversation

@khaykov
Copy link
Contributor

@khaykov khaykov commented Aug 4, 2017

Fixes #418 (and bunch of related functionality)

This PR fixes block styling in ambiguous situations. Apparently, people style all kind of weirdly selected text!
The original issue happened when you applied quote to the selection that included \n at the end.
This was one of the many problems that were caused by issues in detecting the quote in selection, and bounds of the paragraphs.

There are a lot of scenarios where problems were happening, and I think I recreated all of them in tests.

…-Android into issue/fix-block-styling-of-empty-lines

# Conflicts:
#	CHANGELOG.md
@0nko 0nko self-assigned this Aug 8, 2017
Copy link
Contributor

@0nko 0nko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to produce a crash:

  1. Start with the demo text
  2. Type a letter in the empty unordered list item
  3. Tap on the on the blockquote text
  4. Un-apply the quote, then reapply it
  5. Notice the crash


### Fixed
- Image/video loading placeholder drawable usage
- Quote styling of the paragraph ends, empty and mixed lines
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🏆

@khaykov
Copy link
Contributor Author

khaykov commented Aug 14, 2017

Good catch! Fixed.

@0nko
Copy link
Contributor

0nko commented Aug 14, 2017

Nice, it works now. Another thing I tried was apply the quote to an empty list item. Each time a new nested blockquote gets created, it's never removed. Is that expected?

@khaykov
Copy link
Contributor Author

khaykov commented Aug 14, 2017

Each time a new nested blockquote gets created, it's never removed. Is that expected?
I can't reproduce this one. Can you attach a screenshot of a text layout where this happens?

@0nko
Copy link
Contributor

0nko commented Aug 14, 2017

Turns out I forgot to pull the last commit. 🤦‍♂️ Nevermind.

@0nko
Copy link
Contributor

0nko commented Aug 14, 2017

Good job! 🎉
:shipit:

@0nko 0nko merged commit 8f1c088 into develop Aug 14, 2017
@daniloercoli daniloercoli deleted the issue/fix-block-styling-of-empty-lines branch September 12, 2018 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash report 7.8: RuntimeException in BlockFormatter.toggleQuote

3 participants