on master help sign in
Comments about rendering the root node
88c7e25Neil Mitchell
cbits/hexml.c+1
@@ -156,6 +156,7 @@ int node_render(document* d, node* n, char* buffer, int length)
156 r.buffer = buffer;
156 r.buffer = buffer;
157 r.length = length;
157 r.length = length;
158 r.cursor = 0;
158 r.cursor = 0;
159+ // The root node (and only the root node) has an empty length, so just render its innards
159 if (n->name.length == 0)
160 if (n->name.length == 0)
160 render_content(&r, n);
161 render_content(&r, n);
161 else
162 else