Skip to content

Commit

Permalink
fix: use new line boundaries
Browse files Browse the repository at this point in the history
Co-authored-by: Caroline Desprat <[email protected]>
  • Loading branch information
pirhoo and caro3801 committed Jun 19, 2024
1 parent bdb6993 commit 6a3cd6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ document.addEventListener('datashare:ready', ({ detail }) => {
const toSentenceCase = str => {
const sentences = tokenizer
// Detect sentences using Sentence Boundary Detection (SBD)
.sentences(str, { preserve_whitespace: false, newline_boundaries: false })
.sentences(str, { preserve_whitespace: false, newline_boundaries: true })
.map(sentence => {
const sanitizedSentence = stripHtml(sentence)
// Only if the string is all in uppercase
Expand Down

0 comments on commit 6a3cd6e

Please sign in to comment.