moxml 0.5.111 → 0.5.112
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/moxml/adapter/leptris.rb +11 -2
- data/lib/moxml/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 63a1ceed1b65075fbb6187383de91bba6fa8a4dc98d7b6c5e1a8b72c6cdbd5c8
|
|
4
|
+
data.tar.gz: f60b17278dd6ce812b27e7bcae595fe464d3192d24bfd68c0b6fb98c285b4dea
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7a4fd16c91ce73fe9fd1ce72d617fe1d5009d454e5bf8418b1e96f36c804459e4b0186d593b813a84d9092fb9c5818f6b25a95aac6b69feedc34eeba2822ad26
|
|
7
|
+
data.tar.gz: 7f1238c394d8ad91e18176ca7d863477ed968fc91bf093a5113885c33665a15a1f83a2696fa68131e039344905679739f97d4c0b1f5ef06b1baf438231ad74c3
|
|
@@ -2113,9 +2113,18 @@ module Moxml
|
|
|
2113
2113
|
return NN_ADD_CHILD.bind_call(parent, child)
|
|
2114
2114
|
rescue ::Leptris::XML::Error, ::RuntimeError => e
|
|
2115
2115
|
raise unless e.message.include?("append_child failed")
|
|
2116
|
-
raise unless child.node_type
|
|
2116
|
+
raise unless %i[element text].include?(child.node_type)
|
|
2117
2117
|
|
|
2118
|
-
|
|
2118
|
+
if child.node_type == :element
|
|
2119
|
+
structural_adopt(parent, child)
|
|
2120
|
+
else
|
|
2121
|
+
# A text node carries no cross-document identity worth
|
|
2122
|
+
# preserving: rebuild it in the parent's document
|
|
2123
|
+
NN_ADD_CHILD.bind_call(
|
|
2124
|
+
parent,
|
|
2125
|
+
doc.create_text_node(child.text),
|
|
2126
|
+
)
|
|
2127
|
+
end
|
|
2119
2128
|
end
|
|
2120
2129
|
end
|
|
2121
2130
|
|
data/lib/moxml/version.rb
CHANGED