Skip to content

Commit

Permalink
Fix #317607 (#2945)
Browse files Browse the repository at this point in the history
* Fix #317607

* fix build

* fix test
  • Loading branch information
JiuqingSong authored Feb 12, 2025
1 parent 01531e2 commit bbe7d52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { adjustTrailingSpaceSelection } from '../../modelApi/selection/adjustTrailingSpaceSelection';
import { formatSegmentWithContentModel } from '../utils/formatSegmentWithContentModel';
import type { IEditor } from 'roosterjs-content-model-types';

Expand All @@ -20,7 +19,6 @@ export function toggleUnderline(editor: IEditor) {
}
},
(format, segment) => !!format.underline || !!segment?.link?.format?.underline,
false /*includingFormatHolder*/,
adjustTrailingSpaceSelection
false /*includingFormatHolder*/
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -491,18 +491,12 @@ describe('toggleUnderline', () => {
segments: [
{
segmentType: 'Text',
text: 'Test',
text: 'Test ',
format: {
underline: true,
},
isSelected: true,
},
{
segmentType: 'Text',
text: ' ',
format: {},
isSelected: true,
},
],
format: {},
},
Expand Down

0 comments on commit bbe7d52

Please sign in to comment.