Skip to content

Implement sup element for Slipstream#235

Merged
jverkoey merged 2 commits into
mainfrom
claude/implement-sup-element-011CUqB753nzYrQLMwxJXZx1
Nov 6, 2025
Merged

Implement sup element for Slipstream#235
jverkoey merged 2 commits into
mainfrom
claude/implement-sup-element-011CUqB753nzYrQLMwxJXZx1

Conversation

@jverkoey

@jverkoey jverkoey commented Nov 5, 2025

Copy link
Copy Markdown
Collaborator

Added the Sup element following the established pattern for inline text elements. The implementation includes:

  • Sup.swift: The superscript element view that conforms to W3CElement
  • SupTests.swift: Tests for empty and text-based sup elements
  • Updated SlipstreamForWebDevelopers.md to document the new element

The Sup element supports both ViewBuilder content and a convenience initializer for string literals, consistent with other text-level semantic elements.

Part of #25

Added the Sup element following the established pattern for inline text elements. The implementation includes:
- Sup.swift: The superscript element view that conforms to W3CElement
- SupTests.swift: Tests for empty and text-based sup elements
- Updated SlipstreamForWebDevelopers.md to document the new element

The Sup element supports both ViewBuilder content and a convenience initializer for string literals, consistent with other text-level semantic elements.
Renamed the Sup element to Superscript to follow SwiftUI naming conventions
of using longer, more descriptive names. Also implemented the Subscript
element for the <sub> HTML tag.

Changes:
- Renamed Sup.swift to Superscript.swift with updated naming throughout
- Added Subscript.swift for subscript text (H₂O example in docs)
- Updated SuperscriptTests.swift (renamed from SupTests.swift)
- Added SubscriptTests.swift with tests for empty and text content
- Updated SlipstreamForWebDevelopers.md to document both elements

Both elements follow the established pattern for inline text elements,
supporting ViewBuilder content and string literal convenience initializers.
@jverkoey jverkoey merged commit f4aa659 into main Nov 6, 2025
2 checks passed
@jverkoey jverkoey deleted the claude/implement-sup-element-011CUqB753nzYrQLMwxJXZx1 branch November 6, 2025 00:26
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.

2 participants