Selaa lähdekoodia

fix: qa regex (#1738)

tags/0.3.34
crazywoola 1 vuosi sitten
vanhempi
commit
994fceece3
No account linked to committer's email address
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2
    2
      api/core/indexing_runner.py

+ 2
- 2
api/core/indexing_runner.py Näytä tiedosto

@@ -632,8 +632,8 @@ class IndexingRunner:
return text

def format_split_text(self, text):
regex = r"Q\d+:\s*(.*?)\s*A\d+:\s*([\s\S]*?)(?=Q|$)"
matches = re.findall(regex, text, re.MULTILINE)
regex = r"Q\d+:\s*(.*?)\s*A\d+:\s*([\s\S]*?)(?=Q\d+:|$)"
matches = re.findall(regex, text, re.UNICODE)

return [
{

Loading…
Peruuta
Tallenna