cheeriojs/cheerio

Could I select a custom tag like <aaa></aaa>?

Fish1230 opened this issue · 0 comments

I want a feature like this ,I have a template html file,there are some custom tag with a custom attribute,like,, I want to replace all the attribute hello's value in tag aaa.I used like this ,

    import * as cheerio from 'cheerio'

    const str=" <aaa hello="123"></aaa><aaa hello="asad"></aaa>";
    const $ = cheerio.load(str);
    const $("aaa").attr('hello',"world");
    console.log($.html());
  //expect
 <aaa hello="world"></aaa><aaa hello="world"></aaa>

but found nothing,so I suppose cheerio cannot select a custom tag.