revert: text split
This commit is contained in:
1 parent
7212b7c8aa
commit
6d350fb8bc
1 file changed
+1
-1
@@ -525,7 +525,7 @@ export const extractSentences = (text) => {
|
||||
});
|
||||
|
||||
// Split the modified text into sentences based on common punctuation marks, avoiding these blocks
|
||||
let sentences = text.match(/[^.?!]+[.!?]+[\])'"`’”]*|.+/g);
|
||||
let sentences = text.split(/(?<=[.!?])\s+/);
|
||||
|
||||
// Restore code blocks and process sentences
|
||||
sentences = sentences.map((sentence) => {
|
||||
|
||||
Reference in new issue
Block a user