epiphany/node_modules/stylelint-order/rules/properties-order/removeEmptyLinesBefore.js
2023-12-09 22:48:07 -08:00

6 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;
};