MCPcopy Create free account
hub / github.com/omkarcloud/botasaurus / collapse_empty_lines

Function collapse_empty_lines

bota/src/bota/apache_utils.py:20–22  ·  view source on GitHub ↗
(conf: str)

Source from the content-addressed store, hash-verified

18 return re.sub(r'[ \t]+</VirtualHost>', '</VirtualHost>', apache_conf)
19
20def collapse_empty_lines(conf: str) -> str:
21 # Replace multiple consecutive newlines (with optional whitespace) with a single newline
22 return re.sub(r'\n\s*\n+', '\n\n', conf.strip()) + '\n'
23
24def sub_at_start(apache_conf, root_path, api_target):
25 return re.sub(

Callers 2

make_apache_contentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected