Skip to content

feat: map Category.label to Atom's label attribute (RFC 4287 §4.2.2.3)#137

Merged
otnc merged 1 commit into
mainfrom
feat/category-label-atom
Jul 14, 2026
Merged

feat: map Category.label to Atom's label attribute (RFC 4287 §4.2.2.3)#137
otnc merged 1 commit into
mainfrom
feat/category-label-atom

Conversation

@otnc

@otnc otnc commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fix bug(s)
  • New feature(s)
  • Others

Adds label to the Category interface, mapped to Atom's label
attribute.

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) and scheme
(§4.2.2.2) were already mapped. Without it, a label required a customXml
duplication of the whole category element.

Emitted on both feed-level and entry-level <category> in Atom 1.0
(renderAttrs already drops it when unset). RSS <category>'s only
attribute is domain, RDF uses dc:subject text, and JSON Feed tags are
plain strings, so RSS/RDF/JSON Feed are unaffected — additive and
backward-compatible.

Related issue(s)

closes #128

Check

  • Check if duplicate PR(s) already exist.
  • Read CONTRIBUTING.md (rules)
  • Run pnpm check (lint & format)
  • Run pnpm test (functions test)
  • Run pnpm build (dist/)
  • (optional) Run pnpm test:coverage and check nothing new went uncovered

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.
@github-actions github-actions Bot added enhancement New feature or request to main for Pull Request to main labels Jul 14, 2026
@otnc otnc merged commit cc9fe73 into main Jul 14, 2026
8 checks passed
@otnc otnc deleted the feat/category-label-atom branch July 14, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request to main for Pull Request to main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Category.label mapping to Atom's label attribute (RFC 4287 §4.2.2.3)

1 participant