lix-website/themes/lix/assets/bootstrap/node_modules/@stylelint/postcss-css-in-js/template-stringifier.js
2024-04-26 22:49:34 -06:00

24 lines
547 B
JavaScript

'use strict';
const Stringifier = require('postcss/lib/stringifier');
class TemplateStringifier extends Stringifier {
literal(node) {
if (node.nodes && node.nodes.length) {
node.nodes.forEach((root) => {
this.builder(root.raws.beforeStart, root, 'beforeStart');
this.stringify(root);
this.builder(root.raws.afterEnd, root, 'afterEnd');
});
} else {
this.builder(node.text, node);
}
if (node.raws.ownSemicolon) {
this.builder(node.raws.ownSemicolon, node, 'end');
}
}
}
module.exports = TemplateStringifier;