def add_anchor(self, id: str, node: Node) -> None:
    if id.startswith('index-'):
        return
    id = ((self.curfilestack[(- 1)] + ':') + id)
    eid = self.escape_id(id)
    sid = self.get_short_id(id)
    for id in (eid, sid):
        if (id not in self.written_ids):
            self.body.append(('@anchor{%s}' % id))
            self.written_ids.add(id)
def add_anchor(self, id: str, node: Node) -> None:
    if id.startswith('index-'):
        return
    id = ((self.curfilestack[(- 1)] + ':') + id)
    eid = self.escape_id(id)
    sid = self.get_short_id(id)
    for id in (eid, sid):
        if (id not in self.written_ids):
            self.body.append(('@anchor{%s}' % id))
            self.written_ids.add(id)