allenhwkim / angular-template

NodeJS AngularJS Server-Side Template Engine
34 stars 10 forks source link

Make it possible to pass options to cheerio.load #7

Closed idmedia-kaiser closed 7 years ago

idmedia-kaiser commented 7 years ago

Hi,

currently it is not possible to pass options to cheerio.load.

E.g. if you need { xmlMode: true }

See options https://github.com/fb55/htmlparser2/wiki/Parser-options

Would it be possible to have something like

options :  { 
 cheerioOptions: {
  xmlMode: true
 } 
}

var $ = cheerio.load(html,options.cheerioOptions);
allenhwkim commented 7 years ago

@FDIM can you take a look into this?

FDIM commented 7 years ago

@idmedia-kaiser Done :)