prettier
eec3e82f - Fix absolute path in custom CSS url() calls (#9966)

Commit
5 years ago
Fix absolute path in custom CSS url() calls (#9966) At Facebook we have some custom pre-processor `-fb-url(/abs/path/)` that gets messed up as `-fb-url(/ abs/path)` with the current version of prettier. The parser has hardcoded logic to only parse as path things that use `url()` but not `-fb-url()` and it parses it as `division /` and `abs/path/`. Because we put a space after division, the bug is introduced. I don't really know the impact of changing the parser, but on the printer side, it is straightforward to not add a space after `/` if it's the first element in a group. I can't think of any reason why you could write `(/ something` in CSS so I think it's a safe change.
Author
Parents
Loading