Skip to content

Commit 719dcbe

Browse files
authored
fix: correctly fix missing +1, -1 (#1722)
1 parent c1227b2 commit 719dcbe

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/core/render/emojify.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@ function replace(m, $1) {
1212

1313
export function emojify(text) {
1414
return text
15-
.replace(/:\+1:/g, ':thumbsup:')
16-
.replace(/:-1:/g, ':thumbsdown:')
1715
.replace(/<(pre|template|code)[^>]*?>[\s\S]+?<\/(pre|template|code)>/g, m =>
1816
m.replace(/:/g, '__colon__')
1917
)
20-
.replace(/:(\w+?):/gi, (inBrowser && window.emojify) || replace)
18+
.replace(/:([a-z0-9_\-\+]+?):/g, (inBrowser && window.emojify) || replace)
2119
.replace(/__colon__/g, ':');
2220
}

0 commit comments

Comments
 (0)