parse.js 326 B

1234567891011
  1. "use strict";
  2. const extract = require("./html/extract-styles");
  3. const parseStyles = require("./html/parse-styles");
  4. module.exports = function parse(source, opts) {
  5. const document = parseStyles(source, opts, extract(source, opts));
  6. document.source.lang = "html";
  7. document.source.syntax = opts.syntax;
  8. return document;
  9. };