hadley / emo

Easily insert emoji into R and RMarkdown
416 stars 53 forks source link

Two new functions perhaps? #39

Open emillykkejensen opened 6 years ago

emillykkejensen commented 6 years ago

Might I suggest:

emojiToHTML <- function(x) paste(paste0("&#", utf8ToInt(x), ";"), collapse = "")

ji_replace_all_withHTML <- function(string) emo::ji_replace_all(string, emojiToHTML)

romainfrancois commented 6 years ago

Would this work for all emojis, even those encoded as multiple runes ?

I like the idea, but this needs better names