Software /
code /
prosody
Comparison
util/xtemplate.lua @ 12975:d10957394a3c
util: Prefix module imports with prosody namespace
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 17 Mar 2023 16:23:16 +0100 |
parent | 12213:dc9d63166488 |
comparison
equal
deleted
inserted
replaced
12974:ba409c67353b | 12975:d10957394a3c |
---|---|
1 local s_gsub = string.gsub; | 1 local s_gsub = string.gsub; |
2 local s_match = string.match; | 2 local s_match = string.match; |
3 local s_sub = string.sub; | 3 local s_sub = string.sub; |
4 local t_concat = table.concat; | 4 local t_concat = table.concat; |
5 | 5 |
6 local st = require("util.stanza"); | 6 local st = require("prosody.util.stanza"); |
7 | 7 |
8 local function render(template, root, escape, filters) | 8 local function render(template, root, escape, filters) |
9 escape = escape or st.xml_escape; | 9 escape = escape or st.xml_escape; |
10 | 10 |
11 return (s_gsub(template, "%b{}", function(block) | 11 return (s_gsub(template, "%b{}", function(block) |