Skip to content

Commit

Permalink
feat: formatting file
Browse files Browse the repository at this point in the history
  • Loading branch information
sereneinserenade committed Jan 10, 2024
1 parent 8b4c082 commit 0a35ac2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/comment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ export const CommentExtension = Mark.create<CommentOptions, CommentStorage>({
return {
commentId: {
default: null,
parseHTML: (el) => (el as HTMLSpanElement).getAttribute("data-comment-id"),
parseHTML: (el) =>
(el as HTMLSpanElement).getAttribute("data-comment-id"),
renderHTML: (attrs) => ({ "data-comment-id": attrs.commentId }),
},
};
Expand Down Expand Up @@ -115,7 +116,7 @@ export const CommentExtension = Mark.create<CommentOptions, CommentStorage>({
const commentMark = node.marks.find(
(mark) =>
mark.type.name === "comment" &&
mark.attrs.commentId === commentId
mark.attrs.commentId === commentId,
);

if (!commentMark) return;
Expand Down

0 comments on commit 0a35ac2

Please sign in to comment.