项目原始demo,不改动
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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

utils.js 229 B

123456789
  1. var htmlparser = require("htmlparser2");
  2. exports.makeDom = function(markup) {
  3. var handler = new htmlparser.DomHandler(),
  4. parser = new htmlparser.Parser(handler);
  5. parser.write(markup);
  6. parser.done();
  7. return handler.dom;
  8. };