1.Add a flag which act like a priority which will permit to set where a node will have to be append in one specific point of time. That way you append at the very last and avoid issue when you wan a node to be at the end of a root node so have to be careful on append at the very last. it will permit to be somewhat unliked from the codepath iterative particularity, in clear it will avoid bugs AND have better perf
2.HTML_GatherLinksParse(Arena *arena, HTML_ParseResult *parse, String8 filename, String8 data) is fake, build it or delete it, we now have selectors.
3.Make a priority list which will permit to append the nodes at a specific time granularity. That way the code order is not relevant and bugs are more unlikely. A solution is having API to push nodes onto an array which is sorted as we push, then when wanted we trigger the append for all nodes or specific types of nodes.