fix: replace all spaces in shortcode (#38)

This commit is contained in:
2023-07-24 13:23:39 +00:00
parent 26b8890245
commit 9d06a07df3

View File

@ -25,7 +25,7 @@ export interface EmojiPack {
} }
function cleanShortcode(shortcode?: string) { function cleanShortcode(shortcode?: string) {
return shortcode?.replace(/\s+/, "_"); return shortcode?.replace(/\s+/g, "_").replace(/_$/, "");
} }
function toEmojiPack(ev: NostrEvent): EmojiPack { function toEmojiPack(ev: NostrEvent): EmojiPack {