Implements the `re.sub` function as a custom Jinja filter.
(string, pattern, repl, count: int = 0)
| 413 | |
| 414 | |
| 415 | def regex_replace(string, pattern, repl, count: int = 0): |
| 416 | """Implements the `re.sub` function as a custom Jinja filter.""" |
| 417 | return re.sub(pattern, repl, string, count=count) |
| 418 | |
| 419 | |
| 420 | env = Environment(loader=BaseLoader, undefined=StrictUndefined) |
nothing calls this directly
no outgoing calls
no test coverage detected