Improved template handling
This commit is contained in:
14
src/cpl_cli/templates/template.py
Normal file
14
src/cpl_cli/templates/template.py
Normal file
@@ -0,0 +1,14 @@
|
||||
class Template:
|
||||
|
||||
@staticmethod
|
||||
def build_template_string(string: str) -> str:
|
||||
return_value = ''
|
||||
for i in range(0, len(string.splitlines())):
|
||||
line = string.splitlines()[i]
|
||||
if i == len(string.splitlines())-1:
|
||||
return_value += f'{line.strip()}'
|
||||
break
|
||||
|
||||
return_value += f'{line.strip()}\n'
|
||||
|
||||
return return_value
|
||||
Reference in New Issue
Block a user