Skip to content

fix(content): drop the trailing rule from every rendered section - #44

Merged
miaulalala merged 1 commit into
mainfrom
fix/dangling-section-rule
Sep 2, 2026
Merged

fix(content): drop the trailing rule from every rendered section#44
miaulalala merged 1 commit into
mainfrom
fix/dangling-section-rule

Conversation

@miaulalala

Copy link
Copy Markdown
Collaborator

Every module ended in two stacked horizontal lines.

Section bodies in the source files end with a --- separating them from the next heading. The player renders one section at a time, so that separator had nothing left to separate and drew a rule directly above the navigation's own top border.

116 of 132 sections were affected, so this was nearly every section of every module.

Stripped at the splitter rather than in the content, because the rules are useful when reading the raw markdown as a document. Only trailing rules go; a rule used mid-section is real content, and no section is left empty by the strip.

🤖 Generated with Claude Code

@miaulalala miaulalala added 3. to review Waiting for reviews bug Something isn't working labels Jul 30, 2026
@miaulalala
miaulalala requested a review from nickvergessen July 30, 2026 11:32
@miaulalala miaulalala self-assigned this Jul 30, 2026
Section bodies end with a `---` separating them from the next heading in the
source. The player renders one section at a time, so that separator drew a rule
directly above the navigation's own top border: two stacked lines at the bottom
of every module. 116 of 132 sections were affected.

Stripped at the splitter, so the rules stay where they are useful - reading the
raw markdown. Only trailing rules go; a rule mid-section is real content.

Signed-off-by: Anna Larch <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The change is localized to section splitting, is well-scoped to trailing rules only, and matches the described rendering issue without introducing broader parsing risk.

Pull request overview

This PR fixes an output formatting issue where most rendered module sections ended with an extra horizontal rule (drawn from the source markdown’s section separator), resulting in two stacked lines above the player navigation border.

Changes:

  • Adds a stripTrailingRule helper within splitIntoSections to remove only trailing markdown horizontal rules from section bodies.
  • Applies the helper when assembling each Section.content, preserving mid-section rules as intentional content.
File summaries
File Description
lib/content.ts Strips trailing horizontal rules from section bodies during markdown splitting to prevent redundant rendered separators.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@miaulalala
miaulalala merged commit 3603d1f into main Sep 2, 2026
3 checks passed
@miaulalala
miaulalala deleted the fix/dangling-section-rule branch September 3, 2026 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants