Sha256: fe1fd7b16ffce63b4426358264eb9fe039b5006ce3b328f51590e193ad42517a

Contents?: true

Size: 358 Bytes

Versions: 24

Compression:

Stored size: 358 Bytes

Contents

'use strict';

/**
 * Remove empty lines before a node. Mutates the node.
 *
 * @param {import('postcss').Node} node
 * @param {'\n' | '\r\n'} newline
 */
function removeEmptyLinesAfter(node, newline) {
	node.raws.after = node.raws.after ? node.raws.after.replace(/(\r?\n\s*\r?\n)+/g, newline) : '';

	return node;
}

module.exports = removeEmptyLinesAfter;

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
trusty-cms-6.3.1 node_modules/stylelint/lib/utils/removeEmptyLinesAfter.js
trusty-cms-5.0.7 node_modules/stylelint/lib/utils/removeEmptyLinesAfter.js
trusty-cms-5.0.6 node_modules/stylelint/lib/utils/removeEmptyLinesAfter.js
trusty-cms-5.0.5 node_modules/stylelint/lib/utils/removeEmptyLinesAfter.js
trusty-cms-5.0.4 node_modules/stylelint/lib/utils/removeEmptyLinesAfter.js
trusty-cms-5.0.3 node_modules/stylelint/lib/utils/removeEmptyLinesAfter.js
trusty-cms-5.0.2 node_modules/stylelint/lib/utils/removeEmptyLinesAfter.js
trusty-cms-5.0.1 node_modules/stylelint/lib/utils/removeEmptyLinesAfter.js
trusty-cms-4.3.5 node_modules/stylelint/lib/utils/removeEmptyLinesAfter.js
trusty-cms-5.0.0 node_modules/stylelint/lib/utils/removeEmptyLinesAfter.js
trusty-cms-4.3.4 node_modules/stylelint/lib/utils/removeEmptyLinesAfter.js
trusty-cms-4.3.3 node_modules/stylelint/lib/utils/removeEmptyLinesAfter.js
trusty-cms-4.3.2 node_modules/stylelint/lib/utils/removeEmptyLinesAfter.js
trusty-cms-4.3.1 node_modules/stylelint/lib/utils/removeEmptyLinesAfter.js
trusty-cms-4.3 node_modules/stylelint/lib/utils/removeEmptyLinesAfter.js
trusty-cms-4.2.3 node_modules/stylelint/lib/utils/removeEmptyLinesAfter.js
trusty-cms-4.2.2 node_modules/stylelint/lib/utils/removeEmptyLinesAfter.js
trusty-cms-4.2.1 node_modules/stylelint/lib/utils/removeEmptyLinesAfter.js
trusty-cms-4.2 node_modules/stylelint/lib/utils/removeEmptyLinesAfter.js
trusty-cms-4.1.9 node_modules/stylelint/lib/utils/removeEmptyLinesAfter.js