Skip to content

Commit

Permalink
emojify: correctly fix missing +1, -1 from #1162, 1a09ce3
Browse files Browse the repository at this point in the history
  • Loading branch information
ChoKaPeek committed Jan 13, 2022
1 parent c1227b2 commit 7b7df10
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 7b7df10

Please sign in to comment.