blob: 71364a8c0d0085c829f8ad4970719e1c398c4e5e [file] [log] [blame]
'use strict';
const isSharedLineComment = require('./isSharedLineComment');
/**
* @param {import('postcss').Node} node
*/
function isAfterSingleLineComment(node) {
const prevNode = node.prev();
return (
prevNode !== undefined &&
prevNode.type === 'comment' &&
!isSharedLineComment(prevNode) &&
prevNode.source &&
prevNode.source.start &&
prevNode.source.end &&
prevNode.source.start.line === prevNode.source.end.line
);
}
module.exports = isAfterSingleLineComment;