Merge branch 'Yidadaa:main' into main

This commit is contained in:
Hk-Gosuto 2023-12-06 20:11:54 +08:00 committed by GitHub
commit 02abc42682
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,10 @@ import { showToast } from "./components/ui-lib";
import Locale from "./locales"; import Locale from "./locales";
export function trimTopic(topic: string) { export function trimTopic(topic: string) {
return topic.replace(/[,。!?”“"、,.!?]*$/, ""); // Fix an issue where double quotes still show in the Indonesian language
// This will remove the specified punctuation from the end of the string
// and also trim quotes from both the start and end if they exist.
return topic.replace(/^["“”]+|["“”]+$/g, "").replace(/[,。!?”“"、,.!?]*$/, "");
} }
export async function copyToClipboard(text: string) { export async function copyToClipboard(text: string) {