Explorar el Código

fix: issue #11868 bring old logic back (#12100)

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
tags/0.15.0
yihong hace 10 meses
padre
commit
8339d2c7c9
No account linked to committer's email address
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2
    1
      api/core/tools/utils/text_processing_utils.py

+ 2
- 1
api/core/tools/utils/text_processing_utils.py Ver fichero

@@ -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)

Cargando…
Cancelar
Guardar