-
Notifications
You must be signed in to change notification settings - Fork 124
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
Getting NullReferenceException in ToCss() #134
Comments
Just came to give the same report. I didn't get this exception in the previous version. |
@TylerBrinks any ideas on this regression? |
The code shouldn't have change substantially - I'm investigating. I have a guess that it's an issue with parsing children of the @page directive. |
That's also what I'm thinking. I saw another issue that seems to have traced it down to that. I noticed @page as well in the css I was processing. I had assumed anything that couldn't be processed would be dropped, but it could be some complex logic. Thanks for taking a look into this. My epub reader relies on this library for rendering. |
Version 4.1.4 is available on NuGet.org |
Sorry to reopen, but this issue isn't fixed on v4.2.0 still. I have:
which still throws:
when doing .ToCSS() I can validate that a PageRule is created, but there are no margins. Edit: This happens not only from css with Page, but you can see here a CSS which is throwing. This has made it so I can't upgrade from v4.1.0. But with the new contributors, I would really like to update to get the newest support. |
I use ExCSS library to parse the CSS file content, edit some of the properties and then generate the updated CSS string. The code is something like this -
But for lot of css strings, the parser works fine, but the
.ToCSS()
method throws null ref exception.The simplest one being this -
I have attached other problematic css files.
Prob-CSS-2.txt
Prob-CSS-1.txt
The text was updated successfully, but these errors were encountered: