feat: map Category.label to Atom's label attribute (RFC 4287 §4.2.2.3)#137
Merged
Conversation
term (§4.2.2.1) and scheme (§4.2.2.2) were already mapped; label was the one attribute of Atom's category construct the model couldn't express, requiring a customXml duplication of the whole element to set it. Emitted on both feed- and entry-level <category> in Atom 1.0 (renderAttrs already drops it when unset). RSS/RDF/JSON Feed have no equivalent attribute, so they're unaffected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
labelto theCategoryinterface, mapped to Atom'slabelattribute.
Why?
RFC 4287 §4.2.2.3: "The 'label' attribute provides a human-readable label
for display in end-user applications. … Atom Processors MAY use it as a
fallback for the term." It's the one attribute of Atom's category
construct the model couldn't express —
term(§4.2.2.1) andscheme(§4.2.2.2) were already mapped. Without it, a label required a
customXmlduplication of the whole category element.
Emitted on both feed-level and entry-level
<category>in Atom 1.0(
renderAttrsalready drops it when unset). RSS<category>'s onlyattribute is
domain, RDF usesdc:subjecttext, and JSON Feed tags areplain strings, so RSS/RDF/JSON Feed are unaffected — additive and
backward-compatible.
Related issue(s)
closes #128
Check
CONTRIBUTING.md(rules)pnpm check(lint & format)pnpm test(functions test)pnpm build(dist/)pnpm test:coverageand check nothing new went uncovered