Skip to content

Optional per-level heading styles (H1–H5) #59

Description

@joestump-agent

Part of #54. Depends on the token-set expansion (#56).

Problem

renderText (render/text.go:10-17) collapses heading levels: h1/h2/h3 all render as Heading, h4/h5 as Subheading. A themed host may want per-level distinction (size is not available in a terminal, but color/underline/case treatment are).

Fix

  • Add optional H1, H2, H3, H4, H5 lipgloss.Style overrides to Styles.
  • Resolution rule: a zero-value H<n> falls back to Heading (h1–h3) / Subheading (h4–h5), so DefaultStyles() output is unchanged and existing hosts that only set Heading/Subheading keep working.
  • Decide and document zero-value detection (lipgloss styles aren't trivially comparable — either track set-ness with a small helper or compare against lipgloss.NewStyle() rendering; pick one and pin it with a test).
  • Test: default output unchanged; with H1 overridden, only h1 text changes.

Low priority relative to #56/#57 — file under "nice for hosts that want editorial hierarchy".

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions