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.

index.js 406B

1234567891011121314151617
  1. 'use strict';
  2. /**
  3. * Regular expression for matching CSS @imports
  4. *
  5. * @param {Object} opts
  6. * @api public
  7. */
  8. module.exports = function (opts) {
  9. opts = opts || {};
  10. var regex = '(?:@import)(?:\\s)(?:url)?(?:(?:(?:\\()(["\'])?(?:[^"\')]+)\\1(?:\\))|(["\'])(?:.+)\\2)(?:[A-Z\\s])*)+(?:;)';
  11. return opts.exact ? new RegExp('(?:^' + regex + '$)', 'i') :
  12. new RegExp('(?:^|\\s)?' + regex, 'gi');
  13. };