package com.github.asavonic.jorgmode.internal.tree;

import com.github.asavonic.jorgmode.tree.*;
import com.github.asavonic.jorgmode.internal.tree.*;

public class DocumentImpl implements Document {
    private Node root = new Element();

    public DocumentImpl() {
    }

    @Override
    public Node getRoot() {
        return root;
    }

    @Override
    public Text createText(String data) {
        return new TextImpl(data);
    }

}

@@ -147,124 +147,349 @@
 .*;%0A
-%0Apublic class DocumentImpl implements Document %7B%0A    private Node root = new Element();%0A%0A    public DocumentImpl() %7B
+import com.github.asavonic.jorgmode.internal.util.IntrusiveList;%0A%0Apublic class DocumentImpl implements Document %7B%0A    private Element root;%0A    private IntrusiveList%3CNode%3E rootListIterm;%0A%0A    public DocumentImpl() %7B%0A        root = new Element();%0A        rootListIterm = new IntrusiveList%3CNode%3E(root);%0A        root.setListItem(rootListIterm);
 %0A   

Fix root list element