Mercurial > prosody-hg
comparison util/template.lua @ 6777:5de6b93d0190
util.*: Remove use of module() function, make all module functions local and return them in a table at the end
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sat, 21 Feb 2015 10:36:37 +0100 |
| parents | 1430c6f36621 |
| children | 94ec474debf5 |
comparison
equal
deleted
inserted
replaced
| 6774:3965662ae091 | 6777:5de6b93d0190 |
|---|---|
| 7 local loadstring = loadstring; | 7 local loadstring = loadstring; |
| 8 local debug = debug; | 8 local debug = debug; |
| 9 local t_remove = table.remove; | 9 local t_remove = table.remove; |
| 10 local parse_xml = require "util.xml".parse; | 10 local parse_xml = require "util.xml".parse; |
| 11 | 11 |
| 12 module("template") | 12 local _ENV = nil; |
| 13 | 13 |
| 14 local function trim_xml(stanza) | 14 local function trim_xml(stanza) |
| 15 for i=#stanza,1,-1 do | 15 for i=#stanza,1,-1 do |
| 16 local child = stanza[i]; | 16 local child = stanza[i]; |
| 17 if child.name then | 17 if child.name then |
