store each line independently,
possibly each line should/may get a "prompt" indicator (which should be non-selectable in the end), or should the prompt be at the code level ? with first prompt continuation prompt ? Mostly this is because code might be python, or bash, or anything else.
the fact that we have multiple lines, means that we can highlight some of the lines which is common but hard in code blocks.
it also looks like the rendering is often hard if we have to treat new lines separately.
"prompt" can also serve in the margin to show the lien numbers in a file.
Trying to think about the code entries, after trying to render a few of them, I think we need to change the structure a bit. Mostly I think we need to
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them