File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed
Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change 177177
178178
179179do -- C14N methods
180- -- list can be a string (space separated), an array of strings, or nil
181180 local function create_xml_string_array (list )
182- local list = list or {}
183-
184- if type (list ) == " string" then
185- -- list is a string, assume it is the space separated PrefixList attribute, split it
186- local list_str = list
187- list = {}
188- list_str :gsub (" ([^%s]+)" , function (cap ) list [# list + 1 ] = cap end )
189- end
190-
191- if # list == 0 then
181+ if list == nil or # list == 0 then
192182 return nil
193183 end
194184
@@ -320,7 +310,7 @@ do -- C14N methods
320310 -- array, which canonicalizes the entire document.
321311 -- @tparam [opt] table opts options table with the following fields:
322312 -- @tparam [opt="C14N_EXCLUSIVE_1_0"] string|number opts.mode any of C14N_1_0, C14N_EXCLUSIVE_1_0, C14N_1_1
323- -- @tparam [opt] array|string opts.inclusive_ns_prefixes array, or space-separated string, of namespace prefixes to include
313+ -- @tparam [opt] array opts.inclusive_ns_prefixes array of namespace prefixes to include
324314 -- @tparam [opt=false] boolean with_comments if truthy, comments will be included
325315 -- @return string containing canonicalized XML, or throws an error if it fails
326316 function methods :canonicalize (select , opts )
You can’t perform that action at this time.
0 commit comments