diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-04-10 13:37:02 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-06-28 02:51:58 +0200 |
commit | 2ff2fb0495febe11d5015d2308d67e1d8048e597 (patch) | |
tree | 2ae9d1da4a701fc6b3945ccc32dfbbf102b9c85a /module/lib/jinja2 | |
parent | Localization badge (diff) | |
download | pyload-2ff2fb0495febe11d5015d2308d67e1d8048e597.tar.xz |
Some code cosmetics about commas, spaces and quotes
Merges #577
Diffstat (limited to 'module/lib/jinja2')
-rw-r--r-- | module/lib/jinja2/filters.py | 2 | ||||
-rw-r--r-- | module/lib/jinja2/nodes.py | 2 | ||||
-rw-r--r-- | module/lib/jinja2/utils.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/module/lib/jinja2/filters.py b/module/lib/jinja2/filters.py index d1848e434..97f06ed7d 100644 --- a/module/lib/jinja2/filters.py +++ b/module/lib/jinja2/filters.py @@ -101,7 +101,7 @@ def do_xmlattr(_eval_ctx, d, autospace=True): .. sourcecode:: html+jinja - <ul{{ {'class': 'my_list', 'missing': none, + <ul{{{'class': 'my_list', 'missing': none, 'id': 'list-%d'|format(variable)}|xmlattr }}> ... </ul> diff --git a/module/lib/jinja2/nodes.py b/module/lib/jinja2/nodes.py index 6446c70ea..f6cdc0d89 100644 --- a/module/lib/jinja2/nodes.py +++ b/module/lib/jinja2/nodes.py @@ -507,7 +507,7 @@ class Keyword(Helper): class CondExpr(Expr): - """A conditional expression (inline if expression). (``{{ + """A conditional expression (inline if expression). (``{{ foo if bar else baz }}``) """ fields = ('test', 'expr1', 'expr2') diff --git a/module/lib/jinja2/utils.py b/module/lib/jinja2/utils.py index 7b77b8eb7..186fc6c44 100644 --- a/module/lib/jinja2/utils.py +++ b/module/lib/jinja2/utils.py @@ -269,7 +269,7 @@ def urlize(text, trim_url_limit=None, nofollow=False): attribute. """ trim_url = lambda x, limit=trim_url_limit: limit is not None \ - and (x[:limit] + (len(x) >=limit and '...' + and (x[:limit] + (len(x) >= limit and '...' or '')) or x words = _word_split_re.split(unicode(escape(text))) nofollow_attr = nofollow and ' rel="nofollow"' or '' |