summaryrefslogtreecommitdiff
path: root/lib/String/Fold.pm6
diff options
context:
space:
mode:
Diffstat (limited to 'lib/String/Fold.pm6')
-rw-r--r--lib/String/Fold.pm62
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/String/Fold.pm6 b/lib/String/Fold.pm6
index 2db1155..9043b94 100644
--- a/lib/String/Fold.pm6
+++ b/lib/String/Fold.pm6
@@ -28,7 +28,7 @@ sub fold (
}
# Work through each word on the line and fold them to the maximum width.
- for $line.comb(/\S+/) -> $word {
+ for $line.words -> $word {
if (new-line-length(@current-words, $word, $indent) <= $width) {
@current-words.append($word);
next;