PHP 8.0.30
Preview: preprocessors.py Size: 576 B
/opt/alt/python37/lib/python3.7/site-packages/mako/ext/preprocessors.py

# ext/preprocessors.py
# Copyright 2006-2019 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php

"""preprocessing functions, used with the 'preprocessor'
argument on Template, TemplateLookup"""

import re


def convert_comments(text):
    """preprocess old style comments.

    example:

    from mako.ext.preprocessors import convert_comments
    t = Template(..., preprocessor=convert_comments)"""
    return re.sub(r"(?<=\n)\s*#[^#]", "##", text)

Directory Contents

Dirs: 1 × Files: 9

Name Size Perms Modified Actions
- drwxr-xr-x 2023-12-06 03:19:35
Edit Download
1.84 KB lrw-r--r-- 2019-08-01 16:26:43
Edit Download
2.09 KB lrw-r--r-- 2019-08-01 16:26:43
Edit Download
2.54 KB lrw-r--r-- 2019-08-01 16:26:43
Edit Download
4.51 KB lrw-r--r-- 2019-08-01 16:26:43
Edit Download
1.91 KB lrw-r--r-- 2019-08-01 16:26:43
Edit Download
576 B lrw-r--r-- 2019-08-01 16:26:43
Edit Download
4.83 KB lrw-r--r-- 2019-08-01 16:26:43
Edit Download
2.11 KB lrw-r--r-- 2019-08-01 16:26:43
Edit Download
0 B lrw-r--r-- 2019-08-01 16:26:43
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).