Commit 3c895d56 authored by lintangsutawika's avatar lintangsutawika
Browse files

reformat

parent 3262fb74
...@@ -398,10 +398,12 @@ def load_yaml_config(yaml_path): ...@@ -398,10 +398,12 @@ def load_yaml_config(yaml_path):
return final_yaml_config return final_yaml_config
return yaml_config return yaml_config
def regex_replace(string, pattern, repl, count=0): def regex_replace(string, pattern, repl, count=0):
"""Implements the `re.sub` function as a custom Jinja filter.""" """Implements the `re.sub` function as a custom Jinja filter."""
return re.sub(pattern, repl, string, count=count) return re.sub(pattern, repl, string, count=count)
env = Environment(loader=BaseLoader, undefined=StrictUndefined) env = Environment(loader=BaseLoader, undefined=StrictUndefined)
env.filters["regex_replace"] = regex_replace env.filters["regex_replace"] = regex_replace
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment