I used this once
escape_shortcodes <- function(text) {
# Pattern that matches {{< >}} but NOT {{{< >}}} (already escaped)
shortcode_pattern <- "(?<!\\{)(\\{\\{<[^>]*>\\}\\})(?!\\})"
text <- gsub(shortcode_pattern, "{\\1}", text, perl = TRUE)
text
}
Is this useful to add ? 🤔