Return to v1.4.5 docs

highlight()



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

Name Type Required Default Description
text string Yes Text to search.
phrases string Yes List of phrases to highlight.
delimiter string No , Delimiter to use in phrases argument.
tag string No span HTML tag to use to wrap the highlighted phrase(s).
class string No highlight Class 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>