comparison env/lib/python3.7/site-packages/jinja2/defaults.py @ 5:9b1c78e6ba9c draft default tip

"planemo upload commit 6c0a8142489327ece472c84e558c47da711a9142"
author shellac
date Mon, 01 Jun 2020 08:59:25 -0400
parents 79f47841a781
children
comparison
equal deleted inserted replaced
4:79f47841a781 5:9b1c78e6ba9c
1 # -*- coding: utf-8 -*-
2 from ._compat import range_type
3 from .filters import FILTERS as DEFAULT_FILTERS # noqa: F401
4 from .tests import TESTS as DEFAULT_TESTS # noqa: F401
5 from .utils import Cycler
6 from .utils import generate_lorem_ipsum
7 from .utils import Joiner
8 from .utils import Namespace
9
10 # defaults for the parser / lexer
11 BLOCK_START_STRING = "{%"
12 BLOCK_END_STRING = "%}"
13 VARIABLE_START_STRING = "{{"
14 VARIABLE_END_STRING = "}}"
15 COMMENT_START_STRING = "{#"
16 COMMENT_END_STRING = "#}"
17 LINE_STATEMENT_PREFIX = None
18 LINE_COMMENT_PREFIX = None
19 TRIM_BLOCKS = False
20 LSTRIP_BLOCKS = False
21 NEWLINE_SEQUENCE = "\n"
22 KEEP_TRAILING_NEWLINE = False
23
24 # default filters, tests and namespace
25
26 DEFAULT_NAMESPACE = {
27 "range": range_type,
28 "dict": dict,
29 "lipsum": generate_lorem_ipsum,
30 "cycler": Cycler,
31 "joiner": Joiner,
32 "namespace": Namespace,
33 }
34
35 # default policies
36 DEFAULT_POLICIES = {
37 "compiler.ascii_str": True,
38 "urlize.rel": "noopener",
39 "urlize.target": None,
40 "truncate.leeway": 5,
41 "json.dumps_function": None,
42 "json.dumps_kwargs": {"sort_keys": True},
43 "ext.i18n.trimmed": False,
44 }