The Flatdoc.slugify function will remove all the chinese & japanese characters, that make all anchor empty. modify var slug = Flatdoc.slugify(text); to var slug = text; fixed this issue. I think these special characters are ok for DOM id attribute.