mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-11 02:31:05 +03:30
15 lines
407 B
JavaScript
Vendored
15 lines
407 B
JavaScript
Vendored
// remove white spaces around operators when safe
|
|
module.exports = function cleanWhitespace(node, item, list) {
|
|
if (node.value === '+' || node.value === '-') {
|
|
return;
|
|
}
|
|
|
|
if (item.prev !== null && item.prev.data.type === 'WhiteSpace') {
|
|
list.remove(item.prev);
|
|
}
|
|
|
|
if (item.next !== null && item.next.data.type === 'WhiteSpace') {
|
|
list.remove(item.next);
|
|
}
|
|
};
|