mintchaos / typogrify

A set of Django template filters to make caring about typography on the web a bit easier.
http://static.mintchaos.com/projects/typogrify/
Other
168 stars 29 forks source link

“Caps” filter does not respect consecutive abbreviations #47

Open andreyshipilov opened 8 years ago

andreyshipilov commented 8 years ago

How to reproduce using Django:

Django View

def view(request):
    context = {'text': 'Text with ABBREV IATURE.'}
    return render(request, 'template.html', context)

Django Template

{% load typogrify_tags %}
{{ text|typogrify }}

Output

Text with <span class="caps">ABBREV</span><span class="caps">IATURE</span>.

Expected output

Text with <span class="caps">ABBREV</span> <span class="caps">IATURE</span>.

Notice the space between span tags in the expected output.