Skip to content

Commit

Permalink
fix: correctly fix missing +1, -1 (#1722)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChoKaPeek authored and Koooooo-7 committed Oct 26, 2022
1 parent 5bfe152 commit a30b165
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/core/render/emojify.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ function replace(m, $1) {

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

0 comments on commit a30b165

Please sign in to comment.