library("psych350lab")
highlight_text("Answer here", apply = TRUE)[1] "[Answer here]{custom-style=\"highlight-yellow\"}"
highlight_text("Answer here", style = "highlight-blue")[1] "[Answer here]{custom-style=\"highlight-blue\"}"
Wraps text in Quarto custom style span for highlighting in Word documents.
highlight_text(text, style = "highlight-yellow", apply = TRUE)
text
|
Text to highlight. |
style
|
Custom style name. Default "highlight-yellow". |
apply
|
If FALSE, return text unchanged. |
Character string with Quarto custom style span.
library("psych350lab")
highlight_text("Answer here", apply = TRUE)[1] "[Answer here]{custom-style=\"highlight-yellow\"}"
highlight_text("Answer here", style = "highlight-blue")[1] "[Answer here]{custom-style=\"highlight-blue\"}"