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.
20 lines
425 B
20 lines
425 B
|
2 years ago
|
"use strict";
|
||
|
|
|
||
|
|
const parse = require("./parse");
|
||
|
|
const stringify = require("./stringify");
|
||
|
|
|
||
|
|
function postcssHtml(config) {
|
||
|
|
const syntax = {
|
||
|
|
parse: (source, opts) =>
|
||
|
|
parse(String(source), { config, syntax, ...(opts || {}) }),
|
||
|
|
stringify,
|
||
|
|
};
|
||
|
|
return syntax;
|
||
|
|
}
|
||
|
|
|
||
|
|
const defaultSyntax = postcssHtml();
|
||
|
|
postcssHtml.parse = defaultSyntax.parse;
|
||
|
|
postcssHtml.stringify = defaultSyntax.stringify;
|
||
|
|
|
||
|
|
module.exports = postcssHtml;
|