mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-01-07 11:40:01 -08:00
4468c3e4af
* Bump mako from 1.2.4 to 1.3.2 Bumps [mako](https://github.com/sqlalchemy/mako) from 1.2.4 to 1.3.2. - [Release notes](https://github.com/sqlalchemy/mako/releases) - [Changelog](https://github.com/sqlalchemy/mako/blob/main/CHANGES) - [Commits](https://github.com/sqlalchemy/mako/commits) --- updated-dependencies: - dependency-name: mako dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Update mako==1.3.2 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> [skip ci]
21 lines
576 B
Python
21 lines
576 B
Python
# ext/preprocessors.py
|
|
# Copyright 2006-2024 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)
|