11cb0ef41Sopenharmony_ci# -*- coding: utf-8 -*-
21cb0ef41Sopenharmony_ci"""
31cb0ef41Sopenharmony_ci    jinja2.defaults
41cb0ef41Sopenharmony_ci    ~~~~~~~~~~~~~~~
51cb0ef41Sopenharmony_ci
61cb0ef41Sopenharmony_ci    Jinja default filters and tags.
71cb0ef41Sopenharmony_ci
81cb0ef41Sopenharmony_ci    :copyright: (c) 2017 by the Jinja Team.
91cb0ef41Sopenharmony_ci    :license: BSD, see LICENSE for more details.
101cb0ef41Sopenharmony_ci"""
111cb0ef41Sopenharmony_cifrom jinja2._compat import range_type
121cb0ef41Sopenharmony_cifrom jinja2.utils import generate_lorem_ipsum, Cycler, Joiner, Namespace
131cb0ef41Sopenharmony_ci
141cb0ef41Sopenharmony_ci
151cb0ef41Sopenharmony_ci# defaults for the parser / lexer
161cb0ef41Sopenharmony_ciBLOCK_START_STRING = '{%'
171cb0ef41Sopenharmony_ciBLOCK_END_STRING = '%}'
181cb0ef41Sopenharmony_ciVARIABLE_START_STRING = '{{'
191cb0ef41Sopenharmony_ciVARIABLE_END_STRING = '}}'
201cb0ef41Sopenharmony_ciCOMMENT_START_STRING = '{#'
211cb0ef41Sopenharmony_ciCOMMENT_END_STRING = '#}'
221cb0ef41Sopenharmony_ciLINE_STATEMENT_PREFIX = None
231cb0ef41Sopenharmony_ciLINE_COMMENT_PREFIX = None
241cb0ef41Sopenharmony_ciTRIM_BLOCKS = False
251cb0ef41Sopenharmony_ciLSTRIP_BLOCKS = False
261cb0ef41Sopenharmony_ciNEWLINE_SEQUENCE = '\n'
271cb0ef41Sopenharmony_ciKEEP_TRAILING_NEWLINE = False
281cb0ef41Sopenharmony_ci
291cb0ef41Sopenharmony_ci
301cb0ef41Sopenharmony_ci# default filters, tests and namespace
311cb0ef41Sopenharmony_cifrom jinja2.filters import FILTERS as DEFAULT_FILTERS
321cb0ef41Sopenharmony_cifrom jinja2.tests import TESTS as DEFAULT_TESTS
331cb0ef41Sopenharmony_ciDEFAULT_NAMESPACE = {
341cb0ef41Sopenharmony_ci    'range':        range_type,
351cb0ef41Sopenharmony_ci    'dict':         dict,
361cb0ef41Sopenharmony_ci    'lipsum':       generate_lorem_ipsum,
371cb0ef41Sopenharmony_ci    'cycler':       Cycler,
381cb0ef41Sopenharmony_ci    'joiner':       Joiner,
391cb0ef41Sopenharmony_ci    'namespace':    Namespace
401cb0ef41Sopenharmony_ci}
411cb0ef41Sopenharmony_ci
421cb0ef41Sopenharmony_ci
431cb0ef41Sopenharmony_ci# default policies
441cb0ef41Sopenharmony_ciDEFAULT_POLICIES = {
451cb0ef41Sopenharmony_ci    'compiler.ascii_str':   True,
461cb0ef41Sopenharmony_ci    'urlize.rel':           'noopener',
471cb0ef41Sopenharmony_ci    'urlize.target':        None,
481cb0ef41Sopenharmony_ci    'truncate.leeway':      5,
491cb0ef41Sopenharmony_ci    'json.dumps_function':  None,
501cb0ef41Sopenharmony_ci    'json.dumps_kwargs':    {'sort_keys': True},
511cb0ef41Sopenharmony_ci    'ext.i18n.trimmed':     False,
521cb0ef41Sopenharmony_ci}
531cb0ef41Sopenharmony_ci
541cb0ef41Sopenharmony_ci
551cb0ef41Sopenharmony_ci# export all constants
561cb0ef41Sopenharmony_ci__all__ = tuple(x for x in locals().keys() if x.isupper())
57