equal
deleted
inserted
replaced
109 t_insert(last_add, s); |
109 t_insert(last_add, s); |
110 return self; |
110 return self; |
111 end |
111 end |
112 |
112 |
113 function stanza_mt:text(text) |
113 function stanza_mt:text(text) |
114 check_text(text, "text"); |
114 if text ~= nil and text ~= "" then |
115 local last_add = self.last_add; |
115 check_text(text, "text"); |
116 (last_add and last_add[#last_add] or self):add_direct_child(text); |
116 local last_add = self.last_add; |
|
117 (last_add and last_add[#last_add] or self):add_direct_child(text); |
|
118 end |
117 return self; |
119 return self; |
118 end |
120 end |
119 |
121 |
120 function stanza_mt:up() |
122 function stanza_mt:up() |
121 local last_add = self.last_add; |
123 local last_add = self.last_add; |