release: Merge branch 'develop' into rc/v11.0.0

This commit is contained in:
Christopher Allen
2024-03-18 19:57:04 +00:00
40 changed files with 69 additions and 71 deletions

View File

@@ -204,9 +204,9 @@ function wrapScore(
score -= Math.pow(maxLength - lineLengths[i], 1.5);
// Optimize for structure.
// Add score to line endings after punctuation.
if ('.?!'.indexOf(linePunctuation[i]) !== -1) {
if ('.?!'.includes(linePunctuation[i])) {
score += limit / 3;
} else if (',;)]}'.indexOf(linePunctuation[i]) !== -1) {
} else if (',;)]}'.includes(linePunctuation[i])) {
score += limit / 4;
}
}