Consider the following example:
x <- rnorm(100)
y <- rnorm(100)
m <- lm(y ~ x)
m
In the web browser or in RStudio, the web page looks like

In VSCode WebView, the code highlighting is not working:

I take a look at the produced reprex_reprex.html and it includes highlight.js library in the form of base64-encoded javascript data uri, which WebView does not seem to support.
<script src="data:application/javascript;base64,LyohIGhpZ2hsaWdodC5qcyB2OS4xMi4wIHwgQlNEMyBMaWNlb...4sazppLGk6IlxcUyJ9fSk7"></script>
I don't find clear documentation or existing issue that says whether this is supported in WebView. Maybe I should file an issue in VSCode repo to ask or in upstream repo to see if they can switch to minified script like jQuery and other libs included in the same file.
PS: It is pandoc that generates the final HTML code, embedding highlight.js in base64 data URI. Looks like we better solve this on our side.
Consider the following example:
In the web browser or in RStudio, the web page looks like
In VSCode WebView, the code highlighting is not working:
I take a look at the produced
reprex_reprex.htmland it includeshighlight.jslibrary in the form of base64-encoded javascript data uri, which WebView does not seem to support.I don't find clear documentation or existing issue that says whether this is supported in WebView. Maybe I should file an issue in VSCode repo to ask or in upstream repo to see if they can switch to minified script like jQuery and other libs included in the same file.
PS: It is
pandocthat generates the final HTML code, embeddinghighlight.jsin base64 data URI. Looks like we better solve this on our side.