feat: distinguish between underline and strikethrough labels#460
feat: distinguish between underline and strikethrough labels#460wuyiping0628 wants to merge 1 commit intodevfrom
Conversation
WalkthroughThe strikethrough formatting implementation is updated from using the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/fluent-editor/src/assets/editor.scss`:
- Around line 71-73: Restore compatibility for legacy HTML by ensuring the
.ql-custom-strike rule targets both the current element and the older 'u' tag:
add or change the selector to include u.ql-custom-strike (e.g.,
u.ql-custom-strike, s.ql-custom-strike { text-decoration: line-through; }) so
existing content using u.ql-custom-strike continues to render as strikethrough
while keeping the s.ql-custom-strike rule.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c2f3eb1a-9d1d-4f12-9ce1-f93f1db17374
📒 Files selected for processing (3)
packages/fluent-editor/src/assets/editor.scsspackages/fluent-editor/src/formats/strike.tspackages/projects/src/views/yuque/YuQue.vue
| s.ql-custom-strike { | ||
| text-decoration: line-through; | ||
| } |
There was a problem hiding this comment.
Preserve legacy strike rendering for existing u.ql-custom-strike content.
Line 71 removes the old selector path; older stored HTML using u.ql-custom-strike will now render as underline (because of the u rule below), not strike.
💡 Suggested compatibility-safe fix
- s.ql-custom-strike {
+ s.ql-custom-strike,
+ u.ql-custom-strike {
text-decoration: line-through;
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| s.ql-custom-strike { | |
| text-decoration: line-through; | |
| } | |
| s.ql-custom-strike, | |
| u.ql-custom-strike { | |
| text-decoration: line-through; | |
| } |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@packages/fluent-editor/src/assets/editor.scss` around lines 71 - 73, Restore
compatibility for legacy HTML by ensuring the .ql-custom-strike rule targets
both the current element and the older 'u' tag: add or change the selector to
include u.ql-custom-strike (e.g., u.ql-custom-strike, s.ql-custom-strike {
text-decoration: line-through; }) so existing content using u.ql-custom-strike
continues to render as strikethrough while keeping the s.ql-custom-strike rule.
PR
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit