Prevent accidental drop of first child when initializing `nodes.Element`.
commita4c5e5885bf1630b8f11b0eed0c69ab4da27db42
authormilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>
Sat, 18 May 2024 08:44:56 +0000 (18 08:44 +0000)
committermilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>
Sat, 18 May 2024 08:44:56 +0000 (18 08:44 +0000)
tree94b983ada908eebc3fd0145ca78202fdebcface1
parent19a47e6c4aa3e39e289d9833dd1c13260913984e
Prevent accidental drop of first child when initializing `nodes.Element`.

Raise ValueError if the "rawsource" argument in `nodes.Element.__init__()`
is an `Element` instance.
Prevents surprises when initializing an element with child element(s)
but forgetting about the mandatory "rawsource" argument.

git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@9712 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
docutils/HISTORY.txt
docutils/docutils/nodes.py