Mercurial > repos > shellac > sam_consensus_v3
comparison env/lib/python3.9/site-packages/jinja2/defaults.py @ 0:4f3585e2f14b draft default tip
"planemo upload commit 60cee0fc7c0cda8592644e1aad72851dec82c959"
author | shellac |
---|---|
date | Mon, 22 Mar 2021 18:12:50 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4f3585e2f14b |
---|---|
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 } |