jinja2.ext.Environment.preprocess

Environment.preprocess(source, name=None, filename=None)[source]

Preprocesses the source with all extensions. This is automatically called for all parsing and compiling methods but not for lex() because there you usually only want the actual source tokenized.