Spaces:
Runtime error
Runtime error
krinlove99
commited on
Commit
·
ddb657d
1
Parent(s):
c2317b3
修复ios版本正则表达式问题
Browse files- src/lib/utils/index.ts +1 -1
src/lib/utils/index.ts
CHANGED
|
@@ -546,7 +546,7 @@ export const extractSentences = (text) => {
|
|
| 546 |
});
|
| 547 |
|
| 548 |
// Split the modified text into sentences based on common punctuation marks, avoiding these blocks
|
| 549 |
-
let sentences = text.
|
| 550 |
|
| 551 |
// Restore code blocks and process sentences
|
| 552 |
sentences = sentences.map((sentence) => {
|
|
|
|
| 546 |
});
|
| 547 |
|
| 548 |
// Split the modified text into sentences based on common punctuation marks, avoiding these blocks
|
| 549 |
+
let sentences = text.match(/[^.?!]+[.!?]+[\])'"`’”]*|.+/g);//解决ios正则表达式的问题
|
| 550 |
|
| 551 |
// Restore code blocks and process sentences
|
| 552 |
sentences = sentences.map((sentence) => {
|