isAfterComment.js 335 B

12345678910111213141516
  1. 'use strict';
  2. const isSharedLineComment = require('./isSharedLineComment');
  3. /**
  4. * @param {import('postcss').Node} node
  5. */
  6. module.exports = function isAfterComment(node) {
  7. const previousNode = node.prev();
  8. if (!previousNode || previousNode.type !== 'comment') {
  9. return false;
  10. }
  11. return !isSharedLineComment(previousNode);
  12. };