From 8fa31d7ede5937b7f6cf4dfecb45b90426ed412c Mon Sep 17 00:00:00 2001 From: rxi Date: Sat, 12 Apr 2014 00:01:55 +0100 Subject: [PATCH] Added "tree" page to lovebird.pages --- lovebird.lua | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/lovebird.lua b/lovebird.lua index cc95722..c795263 100644 --- a/lovebird.lua +++ b/lovebird.lua @@ -162,6 +162,43 @@ end lovebird.pages["buffer"] = [[ ]] +lovebird.pages["tree"] = [[ + + + + + + + + + + +
+ + "> + + + + + +
+]] + + local loadstring = loadstring or load @@ -236,6 +273,14 @@ function lovebird.htmlescape(str) end +function lovebird.truncate(str, len) + if #str < len then + return str + end + return str:sub(1, len - 3) .. "..." +end + + function lovebird.print(...) local str = table.concat(map({...}, tostring), " ") if not lovebird.allowhtml then