Description
From a parsing perspective, the code in https://github.com/useblocks/sphinx-needs/blob/master/sphinx_needs/directives/list2need.py is currently pretty horrible:
because it completely re-generates the text then uses self.state_machine.insert_input
to insert the text into the text stream,
not only is this incompatible with non-rST parsers like MyST,
it also completely breaks any source mapping within that file; for both warnings and needs data
(see e.g. https://github.com/useblocks/sphinx-needs/blob/master/tests/__snapshots__/test_list2need.ambr)
There is a much better, "proper", way to do this I believe; using the new generate_need
function and parsing the content with nested parsing,
I would like to do this, but don't have time straight away