scansion/stanzacmp.lua

changeset 33
227bc1fe52e9
parent 32
0eabed6c91e7
child 91
73fe018a0c5a
equal deleted inserted replaced
32:0eabed6c91e7 33:227bc1fe52e9
81 stanza2_pos = stanza2_pos + 1; 81 stanza2_pos = stanza2_pos + 1;
82 82
83 if type(child2) == type(child) then 83 if type(child2) == type(child) then
84 if type(child) == "table" and child2.name == child.name and child2.attr.xmlns == child.attr.xmlns then 84 if type(child) == "table" and child2.name == child.name and child2.attr.xmlns == child.attr.xmlns then
85 -- Strict deep match 85 -- Strict deep match
86 match = stanzas_strict_match(child, child2); 86 match = stanzas_match(child, child2);
87 elseif type(child) == "string" then -- Text nodes, must be equal, ignoring leading/trailing whitespace 87 elseif type(child) == "string" then -- Text nodes, must be equal, ignoring leading/trailing whitespace
88 match = trim(child) == trim(child2); 88 match = trim(child) == trim(child2);
89 end 89 end
90 break; 90 break;
91 end 91 end

mercurial