-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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: solve the problem that highlighting will prevent the keys #6387
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6387 +/- ##
============================================
+ Coverage 54.51% 58.34% +3.83%
- Complexity 3523 3766 +243
============================================
Files 646 646
Lines 21862 21989 +127
Branches 1528 1546 +18
============================================
+ Hits 11917 12829 +912
+ Misses 9328 8538 -790
- Partials 617 622 +5 ☔ View full report in Codecov by Sentry. |
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JohnNiang The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/cherrypick release-2.17 |
@JohnNiang: new pull request created: #6409 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What type of PR is this?
/kind bug
/area editor
/milestone 2.18.x
What this PR does / why we need it:
此 PR 解决了使用高亮插件之后按
up
或down
按键被阻止的问题。此问题的来源为 halo-sigs/richtext-editor#56 ,在此前的 PR 中为了解决设置字体大小后再次设置高亮,会导致高亮无法完全笼罩字体的问题。
但经过仔细排查,发现上述问题之前的解决方式有误,正确的原因应该是设置字体大小的
span
标签与设置高亮的mark
标签顺序相反导致。如下所示:正确的情况应该是在
span
中包裹mark
。此 PR 提升了TextStyle
的优先级,结果如下所示:How to test it?
测试对文本使用高亮功能之后按
up
或down
按键是否生效。测试对在文本设置大小之后,使用高亮、删除线等样式是否正确。
Which issue(s) this PR fixes:
Fixes #6381
Does this PR introduce a user-facing change?