drop yaml fix

This commit is contained in:
remy
2025-05-01 15:31:54 +10:00
parent 31e45f3137
commit 6f4d62f873
2 changed files with 292 additions and 186 deletions
-20
View File
@@ -1,20 +0,0 @@
import re
def add_indentation(text):
# This pattern matches lines that don't start with a hyphen or whitespace
pattern = r'^(?![-\s])(.*)$'
# Replace with 4 spaces followed by the captured content
result = re.sub(pattern, r' \1', text, flags=re.MULTILINE)
return result
if __name__ == "__main__":
# Example usage
text = """This line will be indented
- This line won't be indented
This line won't be indented either
Another line that will be indented"""
indented_text = add_indentation(text)