Closed dmurdoch closed 2 years ago
The context for this question was trying to load a GLSL shader from an external file, but as it turns out, this isn't a viable way to do that. So while I think this bug is worth fixing, it's not going to help me to fix it.
The
script
component ofhtmlDependency
can be a list containing list entries in order to set attributes on the included script. However, ifall_files = FALSE
is used, this fails. For example, the markdown file below fails to render. Changingall_files
toTRUE
makes it work, as does changingself_contained
totrue
.The problem appears to be here:
https://github.com/rstudio/htmltools/blob/e47232123e8916bf7c8d95f4513d0fa77c8f4d13/R/html_dependency.R#L358
because the code assumes dependencies are all simple filenames.
Here's the sample file to demonstrate: