Update app/main.py
Browse files- app/main.py +2 -1
app/main.py
CHANGED
|
@@ -935,7 +935,8 @@ def deobfuscate_text(text: str) -> str:
|
|
| 935 |
text = text.replace("♩", "")
|
| 936 |
text = text.replace("`♡`", "") # Handle the backtick version too
|
| 937 |
text = text.replace("♡", "")
|
| 938 |
-
|
|
|
|
| 939 |
return text
|
| 940 |
|
| 941 |
# --- Response Format Conversion ---
|
|
|
|
| 935 |
text = text.replace("♩", "")
|
| 936 |
text = text.replace("`♡`", "") # Handle the backtick version too
|
| 937 |
text = text.replace("♡", "")
|
| 938 |
+
# Use regex to remove double backticks only if not part of triple backticks
|
| 939 |
+
text = re.sub(r'(?<!`)``(?!`)', '', text)
|
| 940 |
return text
|
| 941 |
|
| 942 |
# --- Response Format Conversion ---
|