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

7 lines
215 B
JavaScript
Raw Permalink Normal View History

2024-09-06 15:32:35 +00:00
// 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;
};