Skip to content

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