bibibi12345 commited on
Commit
65474ce
·
verified ·
1 Parent(s): 2304159

Update app/main.py

Browse files
Files changed (1) hide show
  1. 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
- text = text.replace("``", "")
 
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 ---