fix line break issue
This commit is contained in:
@ -15,8 +15,6 @@ copy_rules:
|
|||||||
target: './bc8d51405ec040305a87.ico'
|
target: './bc8d51405ec040305a87.ico'
|
||||||
- source: './img/favicon.ico'
|
- source: './img/favicon.ico'
|
||||||
target: './favicon.ico'
|
target: './favicon.ico'
|
||||||
- source: './img/favicon.png'
|
|
||||||
target: './assets/img/favicon.png'
|
|
||||||
|
|
||||||
mode: 'replace' # Überschreibt vorhandene Dateien/Ordner
|
mode: 'replace' # Überschreibt vorhandene Dateien/Ordner
|
||||||
|
|
||||||
@ -25,11 +23,14 @@ copy_rules:
|
|||||||
- sources:
|
- sources:
|
||||||
- './seasonals'
|
- './seasonals'
|
||||||
- './ui'
|
- './ui'
|
||||||
|
- './pictures'
|
||||||
|
|
||||||
- source: './img/background.png'
|
- source: './img/background.png'
|
||||||
target: './assets/img/background.png'
|
target: './assets/img/background.png'
|
||||||
- source: './img/logo.png'
|
- source: './img/logo.png'
|
||||||
target: './assets/img/logo.png'
|
target: './assets/img/logo.png'
|
||||||
|
- source: './img/favicon.png'
|
||||||
|
target: './assets/img/favicon.png'
|
||||||
mode: 'copy' # Kopiert Dateien/Ordner
|
mode: 'copy' # Kopiert Dateien/Ordner
|
||||||
|
|
||||||
# Modifikationsregeln
|
# Modifikationsregeln
|
||||||
|
@ -174,7 +174,8 @@ def modifyFiles(config, destinationDirectory):
|
|||||||
raise ValueError(f"Text '{after_text}' not found in file: {filePath}")
|
raise ValueError(f"Text '{after_text}' not found in file: {filePath}")
|
||||||
elif insert_text not in content:
|
elif insert_text not in content:
|
||||||
print(f" {Colors.GREEN}Inserting text after: {after_text} {Colors.YELLOW}+ ->{Colors.GREEN} {insert_text}{Colors.RESET}")
|
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)
|
||||||
|
content = content.replace(after_text, after_text + insert_text.replace('\n', ''))
|
||||||
else:
|
else:
|
||||||
print(f" {Colors.YELLOW}Text already present after: {after_text}{Colors.RESET}")
|
print(f" {Colors.YELLOW}Text already present after: {after_text}{Colors.RESET}")
|
||||||
errorList['modWarnings'] += 1
|
errorList['modWarnings'] += 1
|
||||||
@ -187,7 +188,8 @@ def modifyFiles(config, destinationDirectory):
|
|||||||
raise ValueError(f"Text '{before_text}' not found in file: {filePath}")
|
raise ValueError(f"Text '{before_text}' not found in file: {filePath}")
|
||||||
elif insert_text not in content:
|
elif insert_text not in content:
|
||||||
print(f" {Colors.GREEN}Inserting text before: {insert_text} {Colors.YELLOW}+ <-{Colors.GREEN} {before_text}{Colors.RESET}")
|
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 + before_text)
|
||||||
|
content = content.replace(before_text, insert_text.replace('\n', '') + before_text)
|
||||||
else:
|
else:
|
||||||
print(f" {Colors.YELLOW}Text already present before: {before_text}{Colors.RESET}")
|
print(f" {Colors.YELLOW}Text already present before: {before_text}{Colors.RESET}")
|
||||||
errorList['modWarnings'] += 1
|
errorList['modWarnings'] += 1
|
||||||
|
Reference in New Issue
Block a user