postcss-selector-parser icon indicating copy to clipboard operation
postcss-selector-parser copied to clipboard

Attribute selector with pipe gets mangled

Open papandreou opened this issue 5 years ago • 1 comments

Context: https://github.com/cssnano/cssnano/pull/925

console.log(require('postcss-selector-parser')().processSync('[ foo | bar ]'));
'[ foo  ]'

Expected output: [ foo | bar ].

Interestingly, it does work when removing some of the whitespace around the |:

  • [ foo| bar ] => [ foo|bar ]
  • [ foo|bar ] => [ foo|bar ]

But:

  • [ foo |bar ] => [ foobar ]

Maybe related to https://github.com/postcss/postcss-selector-parser/issues/200

papandreou avatar Jul 25 '20 13:07 papandreou

Yes, related, feel free to send a PR

alexander-akait avatar Jul 25 '20 13:07 alexander-akait