Skip to content

Commit

Permalink
fix: issue #11868 bring old logic back (#12100)
Browse files Browse the repository at this point in the history
Signed-off-by: yihong0618 <[email protected]>
  • Loading branch information
yihong0618 authored Dec 26, 2024
1 parent 811e4bd commit 8339d2c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/core/tools/utils/text_processing_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ def remove_leading_symbols(text: str) -> str:
str: The text with leading punctuation or symbols removed.
"""
# Match Unicode ranges for punctuation and symbols
pattern = r"^[\u2000-\u206F\u2E00-\u2E7F\u3000-\u303F!\"#$%&'()*+,\-./:;<=>?@\[\]^_`{|}~]+"
# FIXME this pattern is confused quick fix for #11868 maybe refactor it later
pattern = r"^[\u2000-\u206F\u2E00-\u2E7F\u3000-\u303F!\"#$%&'()*+,./:;<=>?@^_`~]+"
return re.sub(pattern, "", text)

0 comments on commit 8339d2c

Please sign in to comment.