'Generate hyperlink targets for tables.
Original visit_table() generates hyperlink targets inside table tags
(<table>) if multiple IDs are assigned to listings.
That is invalid DOM structure.  (This is a bug of docutils <= 0.13.1)
This exports hyperlink targets before tables to make valid DOM structure.'

def generate_targets_for_table(self, node):

    for id in node['ids'][1:]:
        self.body.append(('<span    id="%s"></span>' % id))
        node['ids'].remove(id)
