Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files764 unmodified lines765766767768769770771772773774764 unmodified lines prefix = cleaned_text[: md_match.start()].strip() return f"{prefix}\n<code>\n{inner}\n</code>" if prefix else f"<code>\n{inner}\n</code>"
stripped_orphan_tags = re.sub(r"</?code[^>]*>", "", cleaned_text, flags=re.IGNORECASE).strip() if stripped_orphan_tags != cleaned_text.strip() and stripped_orphan_tags: return f"<code>\n{stripped_orphan_tags}\n</code>"
return cleaned_text
@classmethodapp.py+4