Added consistent support for double- and single-quote delimiters in templates.

Some template filters and tags understood single-quoted arguments, others
didn't. This makes everything consistent. Based on a patch from akaihola.

Fixed #7295.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10118 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick 2009-03-23 09:40:25 +00:00
parent f5c07f89e3
commit a6f429e37e
5 changed files with 152 additions and 66 deletions

View file

@ -10,7 +10,7 @@ r"""
>>> print list(smart_split(r'''This is "a person's" test.'''))[2]
"a person's"
>>> print list(smart_split(r'''This is "a person\"s" test.'''))[2]
"a person"s"
"a person\"s"
>>> list(smart_split('''"a 'one'''))
[u'"a', u"'one"]
>>> print list(smart_split(r'''all friends' tests'''))[1]