Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(html, filePath, env = Parser.DEVELOPMENT_MODE) {
html = this.handleCustomSelfClosedTagsFirst(html);
const dom = new JSDOM(html);
this.debugger = true;
this.env = env;
this.filePath = filePath;
this.viewName = Parser.getViewName(filePath);
this.filename = path.basename(filePath).rtrim('.html');
global.document = dom.window.document;
this.html = html;
this.htmlCompiler = new HtmlCompiler(this.html, this.viewName, this);