diff --git a/app/utils.ts b/app/utils.ts index 3afe40c61..5fe277c63 100644 --- a/app/utils.ts +++ b/app/utils.ts @@ -1,6 +1,10 @@ import { showToast } from "./components/ui-lib"; import Locale from "./locales"; +export function trimTopic(topic: string) { + return topic.replace(/[,。!?、,.!?]*$/, ""); +} + export async function copyToClipboard(text: string) { try { await navigator.clipboard.writeText(text);