Spaces:
Sleeping
Sleeping
Update app_logic.py
Browse files- app_logic.py +14 -3
app_logic.py
CHANGED
@@ -62,7 +62,7 @@ def load_token_from_image_and_set_env(image_pil_object: Image.Image, password: s
|
|
62 |
|
63 |
|
64 |
|
65 |
-
def process_commented_markdown(commented_input):
|
66 |
"""Process a commented markdown string by stripping '# ' from each line if '# # Space:' is present."""
|
67 |
lines = commented_input.strip().split("\n")
|
68 |
print(type(lines))
|
@@ -71,9 +71,20 @@ def process_commented_markdown(commented_input):
|
|
71 |
print("YES")
|
72 |
cleaned_lines = [line.lstrip("# ") for line in lines]
|
73 |
return cleaned_lines
|
74 |
-
return lines
|
75 |
-
|
76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
|
78 |
def parse_markdown(markdown_input):
|
79 |
space_info = {"repo_name_md": "", "owner_md": "", "files": []}
|
|
|
62 |
|
63 |
|
64 |
|
65 |
+
'''def process_commented_markdown(commented_input):
|
66 |
"""Process a commented markdown string by stripping '# ' from each line if '# # Space:' is present."""
|
67 |
lines = commented_input.strip().split("\n")
|
68 |
print(type(lines))
|
|
|
71 |
print("YES")
|
72 |
cleaned_lines = [line.lstrip("# ") for line in lines]
|
73 |
return cleaned_lines
|
74 |
+
return lines'''
|
|
|
75 |
|
76 |
+
def process_commented_markdown(commented_input):
|
77 |
+
"""Process a commented markdown string by stripping '# ' from each line if '# # Space:' is present."""
|
78 |
+
lines = commented_input.strip().split("\n")
|
79 |
+
print(type(lines)) # Original debug print
|
80 |
+
# Check for '# # Space:' or variations (e.g., '# Space:') in any line
|
81 |
+
if any( "# # Space:" in line.strip() for line in lines):
|
82 |
+
print("YES") # Original debug print
|
83 |
+
|
84 |
+
cleaned_lines = [line[2:] if line.startswith("# ") else line for line in lines]
|
85 |
+
|
86 |
+
return cleaned_lines
|
87 |
+
return lines
|
88 |
|
89 |
def parse_markdown(markdown_input):
|
90 |
space_info = {"repo_name_md": "", "owner_md": "", "files": []}
|