diff options
| author | Victor Stinner <victor.stinner@gmail.com> | 2015-04-21 15:26:47 +0200 |
|---|---|---|
| committer | Victor Stinner <victor.stinner@gmail.com> | 2015-04-21 15:26:47 +0200 |
| commit | 04ecd5542849191457ccfc3e42a39452db47825a (patch) | |
| tree | b0a470e46326b709d090a900847bbb004d355607 /paste/util/template.py | |
| parent | 4c177fce89fee925f0f4fbfde00ce2e1252562c0 (diff) | |
| download | paste-04ecd5542849191457ccfc3e42a39452db47825a.tar.gz | |
Strip trailing spaces
Diffstat (limited to 'paste/util/template.py')
| -rw-r--r-- | paste/util/template.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/paste/util/template.py b/paste/util/template.py index afeb353..981816b 100644 --- a/paste/util/template.py +++ b/paste/util/template.py @@ -251,7 +251,7 @@ class Template(object): '(no default_encoding provided)' % value) value = value.encode(self.default_encoding) return value - + def _add_line_info(self, msg, pos): msg = "%s at line %s column %s" % ( @@ -479,7 +479,7 @@ def trim_lex(tokens): next = next[m.end():] tokens[i+1] = next return tokens - + def find_position(string, index): """Given a string and index, return (line, column)""" @@ -506,7 +506,7 @@ def parse(s, name=None): [('cond', (1, 3), ('if', (1, 3), 'x', ['a']), ('elif', (1, 12), 'y', ['b']), ('else', (1, 23), None, ['c']))] Some exceptions:: - + >>> parse('{{continue}}') Traceback (most recent call last): ... @@ -627,7 +627,7 @@ def parse_one_cond(tokens, name, context): return part, tokens next, tokens = parse_expr(tokens, name, context) content.append(next) - + def parse_for(tokens, name, context): first, pos = tokens[0] tokens = tokens[1:] @@ -755,5 +755,5 @@ def fill_command(args=None): if __name__ == '__main__': from paste.util.template import fill_command fill_command() - - + + |
