3
0
Fork 0
mirror of https://github.com/nanoy42/coope synced 2024-11-04 17:06:27 +00:00
coope/django_tex/filters.py

9 lines
194 B
Python
Raw Normal View History

2019-01-06 14:57:02 +00:00
from django.utils.formats import localize_input
def do_linebreaks(value):
return value.replace('\n', '\\\\\n')
FILTERS = {
'localize': localize_input,
'linebreaks': do_linebreaks
}