r-lib / pillar

Format columns with colour
https://pillar.r-lib.org/
Other
178 stars 38 forks source link

format_type_sum() example renders incorrectly #221

Closed krlmlr closed 3 years ago

krlmlr commented 4 years ago

on GHA pkgdown: https://pillar.r-lib.org/reference/format_type_sum.html .

Works in:

krlmlr commented 3 years ago

Still an issue.

krlmlr commented 3 years ago
evaluate::evaluate('
library(pillar)
format_type_sum(1, NULL)
pillar(1)
type_sum.accel <- function(x) {
  I("kg m/s^2")
}
accel <- structure(9.81, class = "accel")
pillar(accel)
')
#> [[1]]
#> $src
#> [1] "\n"
#> 
#> attr(,"class")
#> [1] "source"
#> 
#> [[2]]
#> $src
#> [1] "library(pillar)\n"
#> 
#> attr(,"class")
#> [1] "source"
#> 
#> [[3]]
#> $src
#> [1] "format_type_sum(1, NULL)\n"
#> 
#> attr(,"class")
#> [1] "source"
#> 
#> [[4]]
#> [1] "[1] \"<1>\"\n"
#> 
#> [[5]]
#> $src
#> [1] "pillar(1)\n"
#> 
#> attr(,"class")
#> [1] "source"
#> 
#> [[6]]
#> [1] "<pillar>\n<dbl>\n    1\n"
#> 
#> [[7]]
#> $src
#> [1] "type_sum.accel <- function(x) {\n  I(\"kg m/s^2\")\n}\n"
#> 
#> attr(,"class")
#> [1] "source"
#> 
#> [[8]]
#> $src
#> [1] "accel <- structure(9.81, class = \"accel\")\n"
#> 
#> attr(,"class")
#> [1] "source"
#> 
#> [[9]]
#> $src
#> [1] "pillar(accel)\n"
#> 
#> attr(,"class")
#> [1] "source"
#> 
#> [[10]]
#> [1] "<pillar>\nkg m/s^2\n9.81    \n"

Created on 2021-05-24 by the reprex package (v2.0.0)

krlmlr commented 3 years ago

Local pkgdown::deploy_to_branch(new_process = FALSE) also shows the problem.

krlmlr commented 3 years ago

Same with pkgdown::deploy_to_branch(new_process = TRUE) .

krlmlr commented 3 years ago

Local pkgdown seems to fail too.

krlmlr commented 3 years ago

Blocked by downlit issue.

krlmlr commented 3 years ago

Let's do a \dontshow{} with register_s3_method() .

github-actions[bot] commented 2 years ago

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.