-1:000000000000 | 0:6279a7d40ae7 |
---|---|
1 local html = require "util.html"; | |
2 local json = require "util.json"; | |
3 | |
4 html.basename = function (str) | |
5 return str:match("[^/]+$"); | |
6 end | |
7 | |
8 html.date = function (datetime) | |
9 return datetime:sub(1,10); | |
10 end | |
11 | |
12 html.json = json.encode; | |
13 | |
14 local render = require"util.interpolation".new("%b{}", html.escape, html); | |
15 | |
16 return { | |
17 render = render; | |
18 }; |