Commit bcbdd3e

benny-dou <60535774+benny-dou@users.noreply.github.com>
2025-11-28 09:35:32
fix(utils): update `remove_prefix` to return original string if no prefix is found
1 parent 4847efa
Changed files (1)
src
messages
src/messages/utils.py
@@ -94,7 +94,7 @@ def remove_prefix(s: str, prefix: str, separator: str = ",") -> str:
     """Remove the prefix from the string."""
     if not prefix:
         return s
-    final = ""
+    final = s
     for pfx in strings_list(prefix, separator=separator):
         if s.lower().startswith(pfx.lower()):
             final = s[len(pfx) :].lstrip()