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