Задать вопрос

Тел: +7 965 3737 888

431

Просмотров

1

Ответов

Text Highlighting Filter

This filter can be used to wrap <span class='highlight'> around anything you want to highlight in a block of text. For example, if you had 'foo bar foo baz' inside the context variable MYTEXT, you could do {{ MYTEXT|highlight:'foo' }}, and "<span class='highlight'>foo</span> bar <span class='highlight'>foo</span> baz" would be returned.

How you style the highlight class is up to you.

Вопрос полезен? Да0/Нет0
file_4495.py(130.0б)
None

Ответы (1):

Ответana_pana:27.02.2014
Ответ полезен? Да0/Нет0

Great solution! Thank you!