mirror of
https://gh.wpcy.net/https://github.com/djav1985/v-wordpress-plugin-updater.git
synced 2026-04-28 08:02:16 +08:00
21 lines
582 B
JavaScript
21 lines
582 B
JavaScript
import getPreviousNonSharedLineCommentNode from './getPreviousNonSharedLineCommentNode.mjs';
|
|
import hasBlock from './hasBlock.mjs';
|
|
import { isAtRule } from './typeGuards.mjs';
|
|
|
|
/**
|
|
* @param {import('postcss').AtRule} atRule
|
|
* @returns {boolean}
|
|
*/
|
|
export default function isBlocklessAtRuleAfterBlocklessAtRule(atRule) {
|
|
if (atRule.type !== 'atrule') {
|
|
return false;
|
|
}
|
|
|
|
const previousNode = getPreviousNonSharedLineCommentNode(atRule);
|
|
|
|
if (previousNode === undefined) {
|
|
return false;
|
|
}
|
|
|
|
return isAtRule(previousNode) && !hasBlock(previousNode) && !hasBlock(atRule);
|
|
}
|