'Adjust current li and add the duplicates: fnref2, fnref3, etc.'

def add_duplicates(self, li, duplicates):

    for link in li.iter(u'a'):
        if (link.attrib.get(u'class', u'') == u'footnote-backref'):
            (ref, rest) = link.attrib[u'href'].split(self.footnotes.get_separator(), 1)
            links = []
            for index in range(2, (duplicates + 1)):
                sib_link = copy.deepcopy(link)
                sib_link.attrib[u'href'] = (u'%s%d%s%s' % (ref, index, self.footnotes.get_separator(), rest))
                links.append(sib_link)
                self.offset += 1
            el = list(li)[(-1)]
            for l in links:
                el.append(l)
            break
