src/render.lua

Wed, 24 Nov 2021 16:18:11 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Wed, 24 Nov 2021 16:18:11 +0000
changeset 9
e5f706093df7
parent 0
6279a7d40ae7
child 15
3fe9cef6a187
permissions
-rw-r--r--

Bump Prosody to 85d51bfcf56b (for util.openmetrics change)

local html = require "util.html";
local json = require "util.json";

html.basename = function (str)
	return str:match("[^/]+$");
end

html.date = function (datetime)
	return datetime:sub(1,10);
end

html.json = json.encode;

local render = require"util.interpolation".new("%b{}", html.escape, html);

return {
	render = render;
};

mercurial