hadley / emo

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

Using emo before plotly in rmd breaks plotly #35

Open martj42 opened 6 years ago

martj42 commented 6 years ago

Just stumbled upon a weird one. If I want to use an emoji before a plotly chart like here:

---
title: "Cars"
output: html_document
---

```{r include=FALSE}
library(plotly)
library(emo)
data("mtcars")

r ji("fire")

plot_ly(data = mtcars, x = ~drat, y = ~qsec)

This would break the plotly chart and return some `html` code instead of the plot:
`<div id="htmlwidget-65acd8c73b41644644b6" style="width:672px;height:480px;" class="plotly html-widget">`.

But were I to move the emoji code to after plotly, everything would work fine.