This function converts an object to a character vector and marks it as a ROCK source.
Examples
exampleROCK <-
rock::as.rock_source(c(
"Some example text,",
"and some more. [[look_a_code]]",
"And the end."));
### This can then be processed by other {rock}
### functions, for example:
rock::prettify_source(
exampleROCK
);
#> [1] "This example prints the HTML result in the viewer."
#> [2] "However, for some reason PkgDown refuses to pretty"
#> [3] "print the HTML, despite it being a `htmltools::HTML()`"
#> [4] "result passed to a custom printing function. Therefore,"
#> [5] "you can check the example in the vignette at"
#> [6] "https://rock.opens.science/articles/rock.html"
#> [7] "If you happen to know a solution, please let me know!"