Message about unused text nodes now also contains line numbers.

Helped me a lot when I needed to find a superfluous `-->` in a large `map.xml`.
This commit is contained in:
Jörg Afflerbach 2015-05-20 17:53:58 +02:00
parent a8a90b7656
commit b385c71789

View file

@ -1658,12 +1658,14 @@ void map_parser::find_unused_nodes_recursive(xml_node const& node, std::string &
{
if (node.is_text())
{
error_message += "\n* text '" + node.text() + "'";
error_message += "\n* text '" + node.text();
}
else
{
error_message += "\n* node '" + node.name() + "' at line " + node.line_to_string();
error_message += "\n* node '" + node.name();
}
error_message += "' at line " + node.line_to_string();
return; //All attributes and children are automatically unprocessed, too.
}
xml_node::attribute_map const& attrs = node.get_attributes();