diff --git a/xbin/Greppable.p6 b/xbin/Greppable.p6 index 280b1b6..e4b2e30 100755 --- a/xbin/Greppable.p6 +++ b/xbin/Greppable.p6 @@ -73,7 +73,7 @@ sub process-grep-line($line, %commits) { # 🙈 take ~$repo # used for stats in PrettyLink } - $text = shorten $text, 300; # do not print too long lines + $text = shorten $text || ‘’, 300; # do not print too long lines $text = markdown-escape $text; $text ~~ s:g/ “\c[ESC][1;31m” (.*?) [ “\c[ESC][m” | $ ] /{$0}<\/b>/; # TODO get rid of \/ ? @@ -103,7 +103,7 @@ multi method irc-to-me($msg) { my %commits = (); my $gist = “| File | Code |\n|--|--|\n”; my $stats = gather { - $gist ~= $result.split(“\n”).map({process-grep-line $_, %commits}).join: “\n”; + $gist ~= $result.lines.map({process-grep-line $_, %commits}).join: “\n”; } my $total = $stats.elems; my $modules = $stats.Set.elems;