Skip to content

Commit

Permalink
Fix: emoji +1 and -1 not rendering (docsifyjs#1187)
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-records authored May 23, 2020
1 parent 415f295 commit 1a09ce3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/render/emojify.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ 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__')
)
Expand Down

0 comments on commit 1a09ce3

Please sign in to comment.