Wed, 24 Nov 2021 16:18:11 +0000
Bump Prosody to 85d51bfcf56b (for util.openmetrics change)
0 | 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 | }; |