Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: multiline styling stuck/not working properly #1782

Merged
merged 2 commits into from
Mar 24, 2024

Conversation

Wrth1
Copy link
Contributor

@Wrth1 Wrth1 commented Mar 22, 2024

Description

This PR fixes the bug mentioned in #1550 , where doing styling in multiple lines at the same time doesn't change the toggle. This bug makes the editor so unintuitive.

Related Issues

Fix #1550

Improvements

This change enables us to do styling to multiple line at once without breaking the style toggle, (see #1550 for examples)

Additional notes

The issue was at lib\src\models\documents\nodes\line.dart at line 364-367, it compares style.attributes[attr.key] != attr.value when it should actually compare style.attributes[attr.key]?.value != attr.value. At the issue you can see that @li3317 cannot reproduce it, it might be because in some version of dart anything == (bool)true while in some version only (bool)true == (bool)true

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I titled the PR using Conventional Commits.
  • I did not modify the CHANGELOG.md nor the plugin version in pubspec.yaml files.
  • All existing and new tests are passing.
  • I have run the commands in ./scripts/before_push.sh and it all passed successfully

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate that with a ! in the title as explained in Conventional Commits).
  • No, this is not a breaking change.

Forgot to add that we have to merge the result with rest variable
@singerdmx singerdmx merged commit a711840 into singerdmx:master Mar 24, 2024
2 checks passed
ChenJinCan pushed a commit to im-x/flutter-quill that referenced this pull request Mar 27, 2024
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.

[BUG BOUNTY] Can't remove style on paragraphs that are separated by a new line
2 participants