diff --git a/customize-WebUI.py b/customize-WebUI.py index c47b72f..9246f08 100644 --- a/customize-WebUI.py +++ b/customize-WebUI.py @@ -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}")