Skip to content

Commit a604e6b

Browse files
committed
added note about non-english whitespace adamwulf#124
1 parent f76e104 commit a604e6b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/jquery.columnizer.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,16 @@
170170
var columnText;
171171
var latestTextNode = null;
172172
while($parentColumn.height() < targetHeight && oText.length){
173+
//
174+
// it's been brought up that this won't work for chinese
175+
// or other languages that don't have the same use of whitespace
176+
// as english. This will need to be updated in the future
177+
// to better handle non-english languages.
178+
//
179+
// https://github.com/adamwulf/Columnizer-jQuery-Plugin/issues/124
173180
var indexOfSpace = oText.indexOf(' ', counter2);
174181
if (indexOfSpace != -1) {
175-
columnText = oText.substring(0, oText.indexOf(' ', counter2));
182+
columnText = oText.substring(0, indexOfSpace);
176183
} else {
177184
columnText = oText;
178185
}

0 commit comments

Comments
 (0)