[Cherry Pick] Fix [Utils] Regex trimTopic
- [+] fix(utils.ts): update regular expressions in trimTopic function to handle asterisks
This commit is contained in:
parent
e756506c18
commit
22baebaf8c
|
@ -9,8 +9,9 @@ export function trimTopic(topic: string) {
|
||||||
// This will remove the specified punctuation from the end of the string
|
// 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.
|
// and also trim quotes from both the start and end if they exist.
|
||||||
return topic
|
return topic
|
||||||
.replace(/^["“”]+|["“”]+$/g, "")
|
// fix for gemini
|
||||||
.replace(/[,。!?”“"、,.!?]*$/, "");
|
.replace(/^["“”*]+|["“”*]+$/g, "")
|
||||||
|
.replace(/[,。!?”“"、,.!?*]*$/, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function copyToClipboard(text: string) {
|
export async function copyToClipboard(text: string) {
|
||||||
|
|
Loading…
Reference in New Issue