Skip to content

[FEATURE]: Make markdown <hr> rendered from ---/*** visible and configurable #25116

@chofuhoyu

Description

@chofuhoyu

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

LLM responses often contain --- or *** as visual separators between sections. These get correctly parsed by marked into <hr> elements, but the current CSS (packages/ui/src/components/markdown.css:116-121) makes them invisible:

/* Horizontal Rule - Invisible spacing only */
hr {
  border: none;
  height: 0;
  margin: 40px 0;
}

The result is a jarring 40px gap of whitespace with no visible divider—the separator semantics are lost entirely.

Screenshot showing two paragraphs with a large invisible gap where a horizontal rule should be

Meanwhile, the theme system already defines --markdown-horizontal-rule color tokens across all themes, and the TUI theme has markdownHorizontalRule. These tokens go unused because the hr element has no border or height to color.

The comment says "Invisible spacing only", however is there a known reason for keeping <hr> invisible? If this behavior is intentional, I’d appreciate a quick explanation, and we can close this issue. Otherwise, I think making it visible would improve the reading experience.

Proposal

Make <hr> visible by rendering it as a thin horizontal line, using the existing --markdown-horizontal-rule theme token (or a sensible default for the TUI).

Optionally, expose a configuration toggle in opencode.json (e.g., markdown.horizontalRule with options like "hidden", "line", or a custom style string) so users can choose the behavior that suits them.

This aligns markdown rendering with standard expectations and makes use of existing infrastructure already in place.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions