add attr to dbg_show_node

This commit is contained in:
Geoff McLane 2015-03-06 18:36:01 +01:00
parent 592f81b606
commit 389ce17814

View file

@ -1564,6 +1564,7 @@ const char *dbg_get_element_name( void *vp )
void dbg_show_node( TidyDocImpl* doc, Node *node, int caller, int indent )
{
AttVal* av;
ctmbstr call = "";
ctmbstr name = dbg_get_element_name(node);
ctmbstr type = dbg_get_lexer_type(node);
@ -1577,9 +1578,19 @@ void dbg_show_node( TidyDocImpl* doc, Node *node, int caller, int indent )
while (indent--)
SPRTF(" ");
if (strcmp(type,name))
SPRTF("%s %s %s %s\n", type, name, impl, call );
SPRTF("%s %s %s %s", type, name, impl, call );
else
SPRTF("%s %s %s\n", name, impl, call );
SPRTF("%s %s %s", name, impl, call );
for (av = node->attributes; av; av = av->next) {
name = av->attribute;
if (name) {
SPRTF(" %s",name);
if (av->value) {
SPRTF("=\"%s\"", av->value);
}
}
}
SPRTF("\n");
}
void dbg_show_all_nodes( TidyDocImpl* doc, Node *node, int indent )