mirror of
https://activitypub.software/TransFem-org/sfm-js
synced 2024-11-22 05:55:13 +00:00
upd: change regex to support non-ascii characters
This commit is contained in:
parent
079b0dd655
commit
9318d6f003
1 changed files with 2 additions and 2 deletions
|
@ -621,12 +621,12 @@ export const language = P.createLanguage({
|
|||
},
|
||||
|
||||
emojiCode: r => {
|
||||
const side = P.notMatch(P.regexp(/[a-z0-9]/i));
|
||||
const side = P.notMatch(P.regexp(/[\p{N}\p{L}]+/i));
|
||||
const mark = P.str(':');
|
||||
return P.seq([
|
||||
P.alt([P.lineBegin, side]),
|
||||
mark,
|
||||
P.regexp(/[a-z0-9_+-]+/i),
|
||||
P.regexp(/[_+\p{N}\p{L}-]+/i),
|
||||
mark,
|
||||
P.alt([P.lineEnd, side]),
|
||||
], 2).map(name => M.EMOJI_CODE(name as string));
|
||||
|
|
Loading…
Reference in a new issue