#' Get all links contained in a wikitext string
#'
#' Vectorized over rev.
#'
#' @param rev A character vector, like one built with \code{page_content} function
#'
#' @return If \code{length(rev) = 1}, a character vector containing all links. If \code{length(rev) > 1}, a list of character vector.
#' @export
#'
#' @importFrom stringr str_extract_all
#'
parse_links <- function(rev) {
lapply(rev, function(x) {
str_extract_all(x, "\\[\\[(?:[^|\\]]*\\|)?([^\\]]+)\\]\\]")[[1]]
})
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.