Skip to content
Myr

Merge branch 'master' of github.com:mitsuhiko/jinja2

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parents de1405f, 147472a · Browse files · 3 files+10 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+10 added−2 removed

  • other:+10 added−2 removed

3 files+10 added−2 removed

modified:jinja2/testsuite/filters.py+8 added
203 unmodified lines
204 assert tmpl.render() == "Foo-Bar"205 tmpl = env.from_string('''{{ "foo\tbar"|title }}''')206 assert tmpl.render() == "Foo\tBar"207208 class Foo:209 def __str__(self):210 return 'foo-bar'211212 tmpl = env.from_string('''{{ data|title }}''')213 out = tmpl.render(data=Foo())214 assert out == 'Foo-Bar'215216 def test_truncate(self):217 tmpl = env.from_string(218 '{{ data|truncate(15, true, ">>>") }}|'219 '{{ data|truncate(15, false, ">>>") }}|'
298 unmodified lines
modified:jinja2/filters.py+1 added-1 removed
181 unmodified lines
182 """Return a titlecased version of the value. I.e. words will start with183 uppercase letters, all remaining characters are lowercase.184 """185 rv = []186 for item in re.compile(r'([-\s]+)(?u)').split(s):186 for item in re.compile(r'([-\s]+)(?u)').split(soft_unicode(s)):187 if not item:188 continue189 rv.append(item[0].upper() + item[1:])190 return ''.join(rv)
797 unmodified lines
modified:setup.py+1 added-1 removed
78 unmodified lines
79 'Topic :: Software Development :: Libraries :: Python Modules',80 'Topic :: Text Processing :: Markup :: HTML'81 ],82 packages=['jinja2', 'jinja2.testsuite', 'jinja2.testsuite.res'],83 install_requires=['markupsafe'],83 install_requires=['MarkupSafe'],84 extras_require={'i18n': ['Babel>=0.8']},85 test_suite='jinja2.testsuite.suite',86 include_package_data=True,87 entry_points="""
4 unmodified lines