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 committed Jan 14, 2022
1 parent c1227b2 commit 719dcbe
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, ':');
}

1 comment on commit 719dcbe

@vercel
Copy link

@vercel vercel bot commented on 719dcbe Jan 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.