removed old code

This commit is contained in:
MLH
2024-12-16 19:16:48 +01:00
parent 95a4e2072c
commit e25b31acec

View File

@ -174,7 +174,6 @@ def modifyFiles(config, destinationDirectory):
raise ValueError(f"Text '{after_text}' not found in file: {filePath}")
elif insert_text not in content:
print(f" {Colors.GREEN}Inserting text after: {after_text} {Colors.YELLOW}+ ->{Colors.GREEN} {insert_text}{Colors.RESET}")
# content = content.replace(after_text, after_text + insert_text)
content = content.replace(after_text, after_text + insert_text.replace('\n', ''))
else:
print(f" {Colors.YELLOW}Text already present after: {after_text}{Colors.RESET}")
@ -188,7 +187,6 @@ def modifyFiles(config, destinationDirectory):
raise ValueError(f"Text '{before_text}' not found in file: {filePath}")
elif insert_text not in content:
print(f" {Colors.GREEN}Inserting text before: {insert_text} {Colors.YELLOW}+ <-{Colors.GREEN} {before_text}{Colors.RESET}")
# content = content.replace(before_text, insert_text + before_text)
content = content.replace(before_text, insert_text.replace('\n', '') + before_text)
else:
print(f" {Colors.YELLOW}Text already present before: {before_text}{Colors.RESET}")