-
Notifications
You must be signed in to change notification settings - Fork 149
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
Don't create an empty <summary> in Atom feeds #83
Conversation
When creating an AtomEntry from an Item, only set Summary if item.Description is non-empty, like we already do for Content. Currently we always emit a <summary> element, even if the item has a non-empty <content> element. Having an empty <summary> in this case may be confusing for feed consumers. The Atom RFC explicitly says that a <summary> is not required in general. (There are a couple special cases where it is required, but they aren't relevant here.) https://tools.ietf.org/html/rfc4287#section-4.1.1.1 Fixes gorilla#82
ping @elithrar |
This issue has been automatically marked as stale because it hasn't seen a recent update. It'll be automatically closed in a few days. |
Not stale. |
This issue has been automatically marked as stale because it hasn't seen a recent update. It'll be automatically closed in a few days. |
Still not stale. |
This issue has been automatically marked as stale because it hasn't seen a recent update. It'll be automatically closed in a few days. |
Poke |
This issue has been automatically marked as stale because it hasn't seen a recent update. It'll be automatically closed in a few days. |
Bump |
This issue has been automatically marked as stale because it hasn't seen a recent update. It'll be automatically closed in a few days. |
poke |
This issue has been automatically marked as stale because it hasn't seen a recent update. It'll be automatically closed in a few days. |
👋 |
This one seems maybe relevant, since the consumer can set the
|
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.
Thanks for making that change. Also kudos for your effort to keep commenting on both issue and PR to avoid staleness.
cc @elithrar, merge this PR.
Hey @magical, In case you haven't seen, Gorilla has abandoned all of their projects. There is a note about it on the readme. I needed a library like this and after some research, this one seemed to fit the build even though it is abandoned. I have forked the project and it can be found here: https://github.com/gopherlibs/feedhub I would appreciate it if you were willing to recreate this PR over at my fork. Having looked at the PR here, I am confident we can get it merged into my fork. p.s. You snagged the GitHub username |
Codecov Report
@@ Coverage Diff @@
## main #83 +/- ##
=======================================
Coverage 79.18% 79.18%
=======================================
Files 5 5
Lines 269 269
=======================================
Hits 213 213
Misses 48 48
Partials 8 8
|
@coreydaley Thanks! |
When creating an AtomEntry from an Item, only set Summary if item.Description is non-empty, like we already do for Content. Currently we always emit a `<summary>` element, even if the item has a non-empty `<content>` element. Having an empty `<summary>` in this case may be confusing for feed consumers. The Atom RFC explicitly says that a `<summary>` is not required in general. (There are a couple special cases where it is required, but they aren't relevant here.) https://tools.ietf.org/html/rfc4287#section-4.1.1.1 Fixes gorilla#82 Co-authored-by: Corey Daley <cdaley@redhat.com>
When creating an AtomEntry from an Item, only set Summary if item.Description is non-empty, like we already do for Content. Currently we always emit a `<summary>` element, even if the item has a non-empty `<content>` element. Having an empty `<summary>` in this case may be confusing for feed consumers. The Atom RFC explicitly says that a `<summary>` is not required in general. (There are a couple special cases where it is required, but they aren't relevant here.) https://tools.ietf.org/html/rfc4287#section-4.1.1.1 Fixes gorilla#82 Co-authored-by: Corey Daley <cdaley@redhat.com>
When creating an AtomEntry from an Item, only set Summary if
item.Description is non-empty, like we already do for Content.
Currently we always emit a
<summary>
element, even if the item has anon-empty
<content>
element. Having an empty<summary>
in this case maybe confusing for feed consumers.
The Atom RFC explicitly says that a
<summary>
is not required in general.(There are a couple special cases where it is required, but they aren't
relevant here.)
https://tools.ietf.org/html/rfc4287#section-4.1.1.1
Fixes #82