fix(content): drop the trailing rule from every rendered section - #44
Merged
Conversation
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]>
miaulalala
force-pushed
the
fix/dangling-section-rule
branch
from
September 2, 2026 20:45
c0d38dc to
7a251ba
Compare
There was a problem hiding this comment.
🟢 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
stripTrailingRulehelper withinsplitIntoSectionsto 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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