@@ -21,6 +21,41 @@ knitr::opts_chunk$set(
2121 comment = "#>",
2222 fig.path = "README-"
2323)
24+
25+ clean_output <- function(x, options) {
26+ x <- gsub("0x[0-9a-f]+", "0xdeadbeef", x)
27+ x <- gsub("dataframe_[0-9]*_[0-9]*", " dataframe_42_42 ", x)
28+ x <- gsub("[0-9]*\\.___row_number ASC", "42.___row_number ASC", x)
29+
30+ index <- x
31+ index <- gsub("─", "-", index)
32+ index <- strsplit(paste(index, collapse = "\n"), "\n---\n")[[1]][[2]]
33+ writeLines(index, "index.md")
34+
35+ x <- gsub(
36+ '(`vignette[(]"([^"]+)"[)]`)',
37+ "[\\1](https://blob.tidyverse.org/articles/\\2.html)",
38+ x
39+ )
40+ x <- fansi::strip_sgr(x)
41+ x
42+ }
43+
44+ options(
45+ cli.num_colors = 256,
46+ cli.width = 71,
47+ width = 71,
48+ pillar.bold = TRUE,
49+ pillar.max_title_chars = 5,
50+ pillar.min_title_chars = 5,
51+ pillar.max_footer_lines = 12,
52+ conflicts.policy = list(warn = FALSE)
53+ )
54+
55+ local({
56+ hook_source <- knitr::knit_hooks$get("document")
57+ knitr::knit_hooks$set(document = clean_output)
58+ })
2459```
2560
2661# blob <a href =" https://blob.tidyverse.org " ><img src =" man/figures/logo.png " align =" right " height =" 122 " alt =" blob website " /></a >
0 commit comments