Skip to content
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

Merged
merged 1 commit into from
Mar 12, 2021
Merged

A few nullable changes #527

merged 1 commit into from
Mar 12, 2021

Conversation

MihaZupan
Copy link
Collaborator


Assert.That(html, !Contains.Substring("rel="));
}

Copy link
Collaborator Author

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))
Copy link
Collaborator Author

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

Copy link
Sponsor Contributor

@iamcarbon iamcarbon Mar 11, 2021

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.

Copy link
Collaborator Author

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

Copy link
Sponsor Contributor

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. 👍

@MihaZupan MihaZupan mentioned this pull request Mar 11, 2021
@xoofx xoofx merged commit da0ba34 into xoofx:master Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants