djangosnippets.org: Latest snippets posted by nicolaslarahttps://djangosnippets.org/users/nicolaslara/2009-04-19T13:21:10.107543-05:00nicolaslarahighlight pattern
2009-04-19T13:21:10.107543-05:00nicolaslarahttps://djangosnippets.org/snippets/1450/<p>Encloses all matches of a pattern between the opentag and closetag string.
<code>{% with "this is a large test" as a %}
{{ a|highlightpattern:"a" }}
{% endwith %}</code>
yields </p>
<p>this is <b>a</b> l<b>a</b>rge test</p>
Freely redistributable