Skip to content

Commit

Permalink
Avoid invoking Nokogiri builder method when adding tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Novtopro authored and ronaldtse committed Oct 29, 2024
1 parent fa4139b commit c3d8bcc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/lutaml/model/xml_adapter/nokogiri_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def build_ordered_element(xml, element, options = {})
end

tag_name = options[:tag_name] || xml_mapping.root_element
tag_name = "#{tag_name}_" if prefixed_xml.respond_to?(tag_name)
prefixed_xml.public_send(tag_name, attributes) do
if options.key?(:namespace_prefix) && !options[:namespace_prefix]
xml.parent.namespace = nil
Expand Down

0 comments on commit c3d8bcc

Please sign in to comment.