use cheerio's htmlparser2
pass element start and end indices to setAttribute callback

needs tests