Skip to content

Commit d27c121

Browse files
committed
Strip a lot of newlines in configs
1 parent 9012a14 commit d27c121

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

netbox_config_diff/compliance/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ def __init__(self, choices, *args, **kwargs):
3939

4040

4141
def get_unified_diff(rendered_config: str, actual_config: str, device: str) -> str:
42+
rendered_config = re.sub("\n{3,}", "\n", rendered_config)
43+
actual_config = re.sub("\n{3,}", "\n", actual_config)
4244
diff = unified_diff(
4345
actual_config.splitlines(),
4446
rendered_config.strip().splitlines(),

0 commit comments

Comments
 (0)