智能照明系统APP-本地串口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
LightingSystemApp-serial/.svn/pristine/f6/f62548ea889c267d9c7bdea34bf...

21 lines
448 B

const {
Parser,
DomHandler
} = require('stricter-htmlparser2')
module.exports = function parse(sourceCode) {
const handler = new DomHandler()
new Parser(handler, {
xmlMode: false,
lowerCaseAttributeNames: false,
recognizeSelfClosing: true,
lowerCaseTags: false
}).end(sourceCode)
return {
type: 'tag',
name: 'root',
attribs: {},
children: Array.isArray(handler.dom) ? handler.dom : [handler.dom]
}
}