File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -312,6 +312,7 @@ do -- C14N methods
312312 -- @tparam [opt=false] boolean with_comments if truthy, comments will be included
313313 -- @return string containing canonicalized XML, or throws an error if it fails
314314 function methods :canonicalize (select , opts )
315+ select = select or {} -- default to include all nodes in the output
315316 opts = opts or {}
316317 local with_comments = opts .with_comments and 1 or 0 -- default = not including comments
317318
@@ -326,9 +327,6 @@ do -- C14N methods
326327 local output_buffer = libxml2 .xmlOutputBufferCreate (buffer )
327328
328329 local success
329- if select == nil then
330- select = {} -- default to include all nodes in the output
331- end
332330 if type (select ) == " function" then -- callback function
333331 -- wrap the callback to pass wrapped objects, and return 1 or 0
334332 local callback = function (_ , xml_node , xml_parent )
You can’t perform that action at this time.
0 commit comments