gadenbuie / xaringanExtra

:ferris_wheel: A playground of enhancements and extensions for xaringan slides.
https://pkg.garrickadenbuie.com/xaringanExtra
Other
448 stars 36 forks source link

[use_logo] Full URL not working #54

Closed gadenbuie closed 4 years ago

gadenbuie commented 4 years ago
---
title: "xaringanExtra use_logo issue"
output:
  xaringan::moon_reader:
    lib_dir: libs
    seal: false
---

class: center, middle

```{r xaringan-extra, echo=FALSE}
xaringanExtra::use_logo("https://raw.githubusercontent.com/electorArg/polAr/master/hex/hex-polAr.png", width="100px")

xaringan

/ʃaː.'riŋ.ɡan/



Reported by https://twitter.com/TuQmano/status/1301912466398629889
gadenbuie commented 4 years ago

Apparently, even though marked (the markdown parser) skips the <style> block where I set the logo CSS, the inline URL linkifier turns the background-image: url(...) into a link

background-image: url(<a href="...">...</a>);

which obviously doesn't work.

The remedy is to include the styles and scripts inside a bare <div> and to make sure there is no leading whitespace on CSS lines inside the <style> tag.