Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix syntax highlighting on windows #1288

Merged
merged 2 commits into from
Apr 6, 2020
Merged

Fix syntax highlighting on windows #1288

merged 2 commits into from
Apr 6, 2020

Conversation

hadley
Copy link
Member

@hadley hadley commented Apr 3, 2020

Fixes #1282

@jayhesselberth
Copy link
Collaborator

But why was it working before? Or it never was?

@hadley
Copy link
Member Author

hadley commented Apr 3, 2020

I think it's just that more cases end up going through this path, making the problem more obvious?

@jayhesselberth
Copy link
Collaborator

jayhesselberth commented Apr 3, 2020

Edit: I think I might be wrong about this. But these bugs seem to be related on my machine.

I think the issue this is intended to fix might actually be caused by r-lib/xml2#293:

# using xml2 1.3.0
tmp <- tempfile()
cat("x <- 1", file = tmp)
xml2::read_html(tmp, encoding = "UTF-8")
#> {html_document}
#> <html>
#> [1] <body><p>x </p></body>

tmp <- tempfile()
cat("x = 1", file = tmp)
xml2::read_html(tmp, encoding = "UTF-8")
#> {html_document}
#> <html>
#> [1] <body><p>x = 1</p></body>

Created on 2020-04-03 by the reprex package (v0.3.0)

@hadley
Copy link
Member Author

hadley commented Apr 4, 2020

@jayhesselberth I initially thought that too, but the examples have the same problem and don't aren't processed via xml2.

jayhesselberth referenced this pull request in r-lib/xml2 Apr 4, 2020
Oh C string handling how I loathe you
@hadley hadley merged commit 6310038 into master Apr 6, 2020
@hadley hadley deleted the highlight branch April 6, 2020 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pkgdown 1.5.0 does not render / evaluate R code chunks
2 participants