quarto-dev / quarto-dev/quarto-r
Add a escape shortcode function
Open
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 161
- Forks
- 29
- Avg merge
- 3h 18m
- Merged PRs (30d)
- 1
Description
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 ? 🤔
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file, entry point, or test is named. Start by locating existing shortcode handling in the quarto-r package and determine whether a public escape_shortcodes function belongs there; then verify the supplied examples, including escaping {{< >}} without changing already escaped {{{< >}}}.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- content
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100