public override VisitorAction VisitTableEnd(Table table)
{
// At the moment there is no way to tell if a particular Table/Row/Cell is hidden.
// Instead, if the content of a table is hidden, then all inline child nodes of the table should be
// hidden and thus removed by previous visits as well. This will result in the container being empty
// so if this is the case we know to remove the table node.
//
// Note that a table which is not hidden but simply has no content will not be affected by this algorthim,
// as technically they are not completely empty (for example a properly formed Cell will have at least
// an empty paragraph in it)
if (!table.HasChildNodes)
table.Remove();
return VisitorAction.Continue;
}