[FIX] Multiple InsertChild
The current implementation does not extend the Child slice of the element, so if we call several times the `InsertChild()` method, the end of the Child slice is deleted as described in the documentation of the `copy` builtin (copied elements are the min of the size of the 2 slices).
This PR increases the size of the Child slice to make sure that the insertion doesn't remove any other child.
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index cf6592d..ae44742 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -4,3 +4,4 @@
Graham King (grahamking)
Matt Smith (ma314smith)
Michal Jemala (michaljemala)
+Nicolas Piganeau (npiganeau)
diff --git a/etree.go b/etree.go
index fb09323..21f8352 100644
--- a/etree.go
+++ b/etree.go
@@ -352,6 +352,7 @@
for i, c := range e.Child {
if c == ex {
+ e.Child = append(e.Child, nil)
copy(e.Child[i+1:], e.Child[i:])
e.Child[i] = t
return