fix: replace all spaces in shortcode (#38)
This commit is contained in:
@ -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 {
|
||||||
|
Reference in New Issue
Block a user