fix(editor): render strikethrough on links (#15109)
**Issue** Strikethrough on a link doesn't render. The toolbar button highlights but no line appears (#15106). **Solution** affine-link hardcoded text-decoration: none in the override it passes to affineTextStyles, which clobbered the decoration computed from strike/underline. Removing it fixes the render; plain links still show no underline because affineTextStyles returns none by default. **Result** Strikethrough and underline render on links again. Added an e2e test: a plain link stays undecorated, a struck link renders line-through, red before the fix and green after. fix #15106 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Fixed link text-decoration styling to properly support strikethrough and other text formatting when applied to links. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
committed by
GitHub
parent
6a2b73e76f
commit
ac3c93ccfa
@@ -160,7 +160,6 @@ export class AffineLink extends WithDisposable(ShadowlessElement) {
|
||||
const linkStyle = {
|
||||
color: 'var(--affine-link-color)',
|
||||
fill: 'var(--affine-link-color)',
|
||||
'text-decoration': 'none',
|
||||
cursor: 'pointer',
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user