Skip to content

Commit

Permalink
Update regex
Browse files Browse the repository at this point in the history
  • Loading branch information
vivek-nexus committed Jul 18, 2024
1 parent 859f493 commit a8e12c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/handleArticle/useSplitArticleToSentences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function useSplitArticleToSentences() {
// Chinese: 。, !, ?, ……
// Japanese: 。, !, ?, ・・・
// Arabic: ., ؟, !
const sentenceSplitter = /([.|!|?|||||]+[\])'""]*\s+)/
const sentenceSplitter = /([.|!|?|||||]+[\])'""]*\s*)\s*/

// Split the text into initial sentences. Contains sliced sentences and punctuation marks as items.
// In the resultant array, sentence slices will be found at even indexes and punctuations at odd indexes.
Expand Down

0 comments on commit a8e12c2

Please sign in to comment.