diff --git a/extra/webapps/pastebin/pastebin.factor b/extra/webapps/pastebin/pastebin.factor index 0a7dc559c3..9492e9e5a1 100755 --- a/extra/webapps/pastebin/pastebin.factor +++ b/extra/webapps/pastebin/pastebin.factor @@ -57,8 +57,11 @@ C: annotation : paste-link ( paste -- link ) paste-n number>string [ show-paste ] curry quot-link ; +: safe-head ( seq n -- seq' ) + over length min head ; + : paste-feed ( -- entries ) - get-pastebin pastebin-pastes [ + get-pastebin pastebin-pastes 20 safe-head [ { paste-summary paste-link