Handles edge cases where the node is self referenced.
This is a follow up to https://github.com/wasinger/htmlpagedom/pull/31. A similar fix was applied to the after/before/prepend/append family of functions. In some cases there was no unit test for some functions, so they were added as well.
Handles edge cases where the node is self referenced.
This is a follow up to https://github.com/wasinger/htmlpagedom/pull/31. A similar fix was applied to the after/before/prepend/append family of functions. In some cases there was no unit test for some functions, so they were added as well.