-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
After update to AngleSharp 1.1.0: 'No source reference attached to test element, cannot determine element tag closing style.' #42
Comments
I am not sure what has changed with the latest AngleSharp to cause this. The DiffBuilder's parser has The part of the code that causes the expectation to be thrown is this: @FlorianRappl do you have some insights here? |
Yes, I have expected that there would have been a bug with this property, so I tested it and the source reference is actually there. At least in my test |
Yes, I think this is a problem (not that it's It was introduced here: AngleSharp/AngleSharp#1159 Actually I am not sure if its a breaking change (in my eyes it kind of is, but then again the I need to investigate if this new Question to you @egil - is this ( |
@FlorianRappl it is only needed to determine if a tag is self-closing or not: AngleSharp.Diffing/src/AngleSharp.Diffing/Strategies/ElementStrategies/ElementComparer.cs Lines 44 to 55 in 370d44b
If there is another way to get that information without a |
@SebastianStehle if you do not need the differ to tell you if tags using different closing styles, you can disable that check by calling |
Unfortunately I need that. |
I don't think so. Just to be clear: You need to know if it's Effectively, there should be no difference (from the parsing perspective there is a lot of difference - in real / official HTML5 only a few elements can be self-closed - and all of them should actually be self-closed without the trailing slash - for example |
I've pushed an update. With this latest preview it should work again. @SebastianStehle can you try to upgrade AngleSharp to |
I understand that. The challenge is that some users want to know if two HTML snippets are the same, down to whether or not tags are self-closing or not. By default AngleSharp.Diffing do not consider the self-closingness of elements when it compares them. |
Any update @SebastianStehle ? |
I will test it out today. |
I think we can close this - this is fixed with AngleSharp 1.1.1. Closing now - if this is not true please let us know. Thanks! |
Bug Report
Prerequisites
AngleSharp.Css
for CSS support)For more information, see the
CONTRIBUTING
guide.Description
I have updated to
AngleSharp 1.1.0
from1.0.7
and now I get the following error.Steps to Reproduce
Very simple example:
Expected behavior: No error.
Actual behavior: [What actually happened]
Environment details: [OS, .NET Runtime, ...]
AngleSharp.Diffing:
0.18.2
Possible Solution
[Optionally, share your idea to fix the issue]
The text was updated successfully, but these errors were encountered: