prettier 1.9.1 → 1.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/parser-postcss.js CHANGED
@@ -28327,6 +28327,16 @@ module.exports = function(module) {
28327
28327
  const createError = __webpack_require__(91);
28328
28328
 
28329
28329
  function parseSelector(selector) {
28330
+ // If there's a comment inside of a selector, the parser tries to parse
28331
+ // the content of the comment as selectors which turns it into complete
28332
+ // garbage. Better to print the whole selector as-is and not try to parse
28333
+ // and reformat it.
28334
+ if (selector.match(/\/\/|\/\*/)) {
28335
+ return {
28336
+ type: "selector-comment",
28337
+ value: selector
28338
+ };
28339
+ }
28330
28340
  const selectorParser = __webpack_require__(89);
28331
28341
  let result;
28332
28342
  selectorParser(result_ => {