Skip to content

Miscellaneous

highlight()

highlight() — returns any

Highlights the phrase(s) everywhere in the text if found by wrapping it in a span tag.

NameTypeRequiredDefaultDescription
textstringyes—Text to search.
phrasesstringyes—List of phrases to highlight.
delimiterstringyes,Delimiter to use in phrases argument.
tagstringyesspanHTML tag to use to wrap the highlighted phrase(s).
classstringyeshighlightClass to use in the tags wrapping highlighted phrase(s).
#highlight(text="You searched for: Wheels", phrases="Wheels")#
-> You searched for: <span class="highlight">Wheels</span>