You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
488 B
22 lines
488 B
'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;
|
|
|