diff --git a/packages/client/src/components/MkNote.vue b/packages/client/src/components/MkNote.vue index c7461ed75..74a5fc3c9 100644 --- a/packages/client/src/components/MkNote.vue +++ b/packages/client/src/components/MkNote.vue @@ -362,9 +362,7 @@ const expandOnNoteClick = defaultStore.state.expandOnNoteClick; const purifyMFM = (src) => { const nodes = mfm.parse(src); const filtered = mfm.extract(nodes, (node) => { - return ["text", "bold", "center", "small", "italic", "strike"].includes( - node.type, - ); + node.type === "text" || node.type === "quote"; }); return mfm.toString(filtered); }; diff --git a/packages/client/src/components/MkNoteSub.vue b/packages/client/src/components/MkNoteSub.vue index 502d23b25..42cba1901 100644 --- a/packages/client/src/components/MkNoteSub.vue +++ b/packages/client/src/components/MkNoteSub.vue @@ -278,9 +278,7 @@ const expandOnNoteClick = defaultStore.state.expandOnNoteClick; const purifyMFM = (src) => { const nodes = mfm.parse(src); const filtered = mfm.extract(nodes, (node) => { - return ["text", "bold", "center", "small", "italic", "strike"].includes( - node.type, - ); + node.type === "text" || node.type === "quote"; }); return mfm.toString(filtered); }; diff --git a/packages/client/src/scripts/get-note-menu.ts b/packages/client/src/scripts/get-note-menu.ts index 04ae9739b..ef9adb289 100644 --- a/packages/client/src/scripts/get-note-menu.ts +++ b/packages/client/src/scripts/get-note-menu.ts @@ -242,7 +242,7 @@ export function getNoteMenu(props: { const res = await os.api("notes/translate", { noteId: appearNote.id, targetLang: - localStorege.getItem("translateLang") || + localStorage.getItem("translateLang") || localStorage.getItem("lang") || navigator.language, });