Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -61,13 +61,13 @@ def generate_visual_snippet(placeholder_text: str, context: str, initial_query:
|
|
| 61 |
# remove special lines
|
| 62 |
def remove_special_lines(input_string):
|
| 63 |
lines = input_string.splitlines()
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
cleanedlines = "\n".join(filtered_lines)
|
| 72 |
return cleanedlines
|
| 73 |
|
|
|
|
| 61 |
# remove special lines
|
| 62 |
def remove_special_lines(input_string):
|
| 63 |
lines = input_string.splitlines()
|
| 64 |
+
filtered_lines = [
|
| 65 |
+
line for line in lines
|
| 66 |
+
if not (
|
| 67 |
+
(line.strip().startswith("%%{init:") and line.strip().endswith("%%")) or
|
| 68 |
+
(line.strip().startswith("classDef") and line.strip().endswith(";"))
|
| 69 |
+
)
|
| 70 |
+
]
|
| 71 |
cleanedlines = "\n".join(filtered_lines)
|
| 72 |
return cleanedlines
|
| 73 |
|