Skip to content

Commit af45845

Browse files
committed
Match lowercase shortcodes only
1 parent d9fc279 commit af45845

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/render/emojify.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function emojify(text, useNativeEmoji) {
3636
// Mark colons in comments
3737
.replace(/<!--[\s\S]+?-->/g, m => m.replace(/:/g, '__colon__'))
3838
// Replace emoji shorthand codes
39-
.replace(/:([\w\-+]+?):/g, (m, $1) =>
39+
.replace(/:([a-z0-9_\-+]+?):/g, (m, $1) =>
4040
replaceEmojiShorthand(m, $1, useNativeEmoji)
4141
)
4242
// Restore colons in tags and comments

0 commit comments

Comments
 (0)