Skip to content

Commit

Permalink
feat
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfeng33 committed Apr 26, 2024
1 parent f4f47cc commit 96959e4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/mark-affinity/src/withMarkAffinity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,13 @@ export const withMarkAffinity = (editor: PlateEditor) => {
editor.selection &&
!isSelectionExpanded(editor)
) {
/**
* check the validMarks exclude the marks which have padding like `MARK_CODE`
*/
const { validMarks } = getPluginOptions<MarkAffinityPlugin>(
editor,
KEY_MARK_AFFINITY
);

const _marks = getMarks(editor);
const marks = _marks ? Object.keys(_marks) : [];

Expand Down

0 comments on commit 96959e4

Please sign in to comment.