Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -423,6 +423,7 @@ Required keys:
|
|
423 |
|
424 |
|
425 |
def format_json(inp):
|
|
|
426 |
print("FORMATTING:::")
|
427 |
print(type(inp))
|
428 |
print("###########")
|
@@ -430,10 +431,11 @@ def format_json(inp):
|
|
430 |
print("###########")
|
431 |
print("###########")
|
432 |
new_str=""
|
|
|
433 |
for i,line in enumerate(inp):
|
434 |
line = line.strip()
|
435 |
print(line)
|
436 |
-
if not (
|
437 |
new_str+=line.strip("\n")
|
438 |
print("###########")
|
439 |
print("###########")
|
|
|
423 |
|
424 |
|
425 |
def format_json(inp):
|
426 |
+
|
427 |
print("FORMATTING:::")
|
428 |
print(type(inp))
|
429 |
print("###########")
|
|
|
431 |
print("###########")
|
432 |
print("###########")
|
433 |
new_str=""
|
434 |
+
matches=["```","#","//"]
|
435 |
for i,line in enumerate(inp):
|
436 |
line = line.strip()
|
437 |
print(line)
|
438 |
+
if not any(x in line for x in matches):
|
439 |
new_str+=line.strip("\n")
|
440 |
print("###########")
|
441 |
print("###########")
|