New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reparse file in silent mode after a CSS parsing error #74
Comments
@gmetais, good idea! How would the |
It could also directly insert But your idea is probably:
|
@gmetais, CSS parser used by Hence closing. Waiting for other ideas on how to implement it :) |
Another idea then. If the The option could be named
It looks like there's a place for this option, have a look at this function: The errors would be a new field in the JSON output: {
"type": "stylesheet",
"stylesheet": {
"rules": [...],
"parsingErrors": [
{
"message": "mystyles.css:300:12:missing '}'",
"reason": "missing '}'",
"filename": "mystyles.css",
"line": 300,
"column": 12,
"source": "..."
}
]
}
} |
I made this pull-request on the css module: reworkcss/css#64 |
Hi!
I've seen that the CSS parser used by analyze-css has a 'silent' option: https://github.com/reworkcss/css#cssparsecode-options
Here's my idea: analyze-css could parse the CSS file a first time without this option, to detect any parsing error.
Then, if there is one, restart parsing in silent mode so the rest of the file can be analyzed despite the error.
The text was updated successfully, but these errors were encountered: