Skip to content

Commit

Permalink
Revert "fix: correctly fix missing +1, -1 (#1722)"
Browse files Browse the repository at this point in the history
This reverts commit a30b165.
  • Loading branch information
Koooooo-7 authored Oct 26, 2022
1 parent 9b894a7 commit 179581a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/render/emojify.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ 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(/:([a-z0-9_\-\+]+?):/g, (inBrowser && window.emojify) || replace)
.replace(/:(\w+?):/gi, (inBrowser && window.emojify) || replace)
.replace(/__colon__/g, ':');
}

0 comments on commit 179581a

Please sign in to comment.