Skip to content

Commit 14c3d95

Browse files
committed
fix(mention): update mention feed and date formatting to use self-closing tags
1 parent 160e136 commit 14c3d95

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

apps/desktop/layer/renderer/src/modules/ai-chat/editor/plugins/mention/MentionNode.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,10 @@ export class MentionNode extends DecoratorNode<React.JSX.Element> {
112112
) {
113113
const { view } = getRouteParams()
114114
const ids = getCategoryFeedIds(value.slice(ROUTE_FEED_IN_FOLDER.length), view)
115-
return `<mention-feed ids=${JSON.stringify(ids)}/>`
115+
return `<mention-feed ids=${JSON.stringify(ids)}></mention-feed>`
116116
}
117117

118-
return `<mention-${type} id="${value}"/>`
118+
return `<mention-${type} id="${value}"></mention-${type}>`
119119
}
120120

121121
override decorate(_editor: LexicalEditor): React.JSX.Element {

apps/desktop/layer/renderer/src/modules/ai-chat/editor/plugins/mention/hooks/dateMentionUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const formatRangeValue = (range: DateRange): string => {
4242
const endExclusive = range.end.add(1, "day").startOf("day")
4343
const endIso = endExclusive.format(MENTION_DATE_VALUE_FORMAT)
4444

45-
return `<mention-date start="${startIso}" end="${endIso}"/>`
45+
return `<mention-date start="${startIso}" end="${endIso}"></mention-date>`
4646
}
4747

4848
const DEFAULT_DATE_FORMAT: Intl.DateTimeFormatOptions = {

0 commit comments

Comments
 (0)