securityos/node_modules/stylelint-order/rules/properties-order/removeEmptyLinesBefore.js

7 lines
215 B
JavaScript

// Remove empty lines before a node. Mutates the node.
module.exports = function removeEmptyLinesBefore(node, newline) {
node.raws.before = node.raws.before.replace(/(\r?\n\s*\r?\n)+/g, newline);
return node;
};