Skip to content
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.

Invalid css passes through #117

Open
arackaf opened this issue Nov 8, 2016 · 1 comment
Open

Invalid css passes through #117

arackaf opened this issue Nov 8, 2016 · 1 comment

Comments

@arackaf
Copy link

arackaf commented Nov 8, 2016

It looks like a prior version of this plugin caused invalid content, like

<<<<<<< HEAD

to error silently, swallowing the error, causing the Node process to hang indefinitely. It looks like the current version just passes the invalid content through.

Not knowing much about the specifics here, but it seems like the earlier version would be more correct, except ideally throwing the error up, forcing the parent process to handle.

@guybedford
Copy link
Member

@arackaf the issue as far as I can tell is that PostCSS is parsing the above without errors causing it to appear fine. In my tests:

>>>>> X

body {
  padding: 10px;
}

Seems to work fine as >>>>> X parses and minifies.

But for example:

>>>>> X {
  asdf
}

body {
  padding: 10px;
}

Seems to cause a deeper error which stops the inlining entirely.

The second error here is the one that worries me because that causes a deeper failure, without any hint to the user as to how to debug it.

We know the value of compilers lies in early warnings. It seems like a missed trick entirely for PostCSS if this is not the case!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants