-
Notifications
You must be signed in to change notification settings - Fork 37
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
added LinkType.Top enum, so we can specify only top level links #202
added LinkType.Top enum, so we can specify only top level links #202
Conversation
if (_resource.LinkType.HasFlag(LinkType.Self)) | ||
// if resource has Top only and not Self, then we render it. | ||
// otherwise to preserve back compatibility if Self is enabled, then we also render it | ||
if ((_resource.LinkType.HasFlag(LinkType.Top) && !_resource.LinkType.HasFlag(LinkType.Self)) |
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 think this can be simplified to Top || Self
?
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.
Agree. Updated it
Saule/LinkType.cs
Outdated
/// <summary> | ||
/// Only top section links | ||
/// </summary> | ||
Top = 4, |
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.
Like I said on the issue, should this contain the word Self
since it only applies to that?
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.
Updated it. Now it's TopSelf
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.
Great!
Thanks! |
Hi Jouke,
It's a PR for #201 item. I tried to preserve back compatibility and all existing tests are passing fine. I also added new one to test Top only scenario.
Thanks