-
-
Notifications
You must be signed in to change notification settings - Fork 444
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
A few nullable changes #527
Conversation
|
||
Assert.That(html, !Contains.Substring("rel=")); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if I'm missing something, but I don't understand this test.
If you don't want the rel
being output... don't add the extension?
{ | ||
Rel = NoFollow; | ||
} | ||
else if (!Rel!.Contains(NoFollow)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This !
isn't needed on Core 3.1+, sadly older runtimes aren't smart enough to realize string.IsNullOrEmpty
is a null check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic needs reworked to correctly handle null.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does handle it via string.IsNullOrEmpty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. Missed the outer logic changes here. 👍
cc: @iamcarbon