Skip to content

Commit df8980b

Browse files
committed
fix (SplittedText): missing spaces after split by word
1 parent 9203123 commit df8980b

File tree

4 files changed

+8
-12
lines changed

4 files changed

+8
-12
lines changed

build/OneLoop.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright 2022 OneLoop.js
44
* Author: Nicolas Langle
55
* Repository: https://github.com/n-langle/OneLoop.js
6-
* Version: 5.1.0
6+
* Version: 5.1.1
77
* SPDX-License-Identifier: MIT
88
*
99
* Credit for easing functions goes to : https://github.com/ai/easings.net/blob/master/src/easings/easingsFunctions.ts
@@ -1067,10 +1067,8 @@ function split(element, separator, wrapper, preserve) {
10671067
return traverseNode(
10681068
element,
10691069
text => {
1070-
const trimmedText = text.trim();
1071-
1072-
return trimmedText !== '' ?
1073-
(separator === '' ? text : trimmedText).split(separator).map(wrapper).join(separator)
1070+
return text.trim() !== '' ?
1071+
text.split(separator).map(wrapper).join(separator)
10741072
:
10751073
text
10761074
},

0 commit comments

Comments
 (0)