mirror of https://github.com/usememos/memos.git
fix(web): support VS16 and ZWJ in tag parsing
This commit is contained in:
parent
6b30579903
commit
2d1de0fd1d
|
|
@ -18,7 +18,11 @@ function isTagChar(char: string): boolean {
|
|||
return true;
|
||||
}
|
||||
|
||||
return char === "_" || char === "-" || char === "/" || char === "&";
|
||||
if (/\p{M}/u.test(char)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return char === "_" || char === "-" || char === "/" || char === "&" || char === "\u200D";
|
||||
}
|
||||
|
||||
function parseTagsFromText(text: string): Array<{ type: "text"; value: string } | { type: "tag"; value: string }> {
|
||||
|
|
|
|||
Loading…
Reference in New Issue