-
Notifications
You must be signed in to change notification settings - Fork 5.1k
fix: Use blank lines in template headers to prevent markdownlint stripping line breaks #1344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ndering The template header sections used trailing double spaces for line breaks, which don't render correctly in GitHub or JetBrains IDEs. This change replaces them with blank lines for consistent cross-platform rendering. Fixes github#1343 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes markdown rendering issues in template files by replacing trailing double-space line breaks with blank lines, ensuring header fields render correctly on separate lines in GitHub and JetBrains IDEs.
Key Changes:
- Removes fragile trailing double-space line breaks from template header sections
- Adds explicit blank lines between header fields for consistent cross-platform rendering
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
templates/spec-template.md |
Removes trailing double spaces from Feature Branch, Created, and Status fields and adds blank lines after each for proper separation |
templates/plan-template.md |
Adds blank line after the Branch/Date/Spec header field to ensure proper rendering |
templates/tasks-template.md |
Adds blank line after the Input field to maintain consistency with other template headers |
The changes are well-focused and directly address the rendering issue described in the PR. The modifications follow a consistent pattern across all three template files, replacing the markdown convention of trailing double spaces (which can be invisible and fragile) with explicit blank lines for better maintainability and cross-platform rendering compatibility.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| **Created**: [DATE] | ||
|
|
||
| **Status**: Draft | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe a better approach would be to add double spaces at the end of the line? this would not break linting as well and would be a nicer visual IMO
**Feature Branch**: `[###-feature-name]`
**Created**: [DATE]
**Status**: Draft There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree it looks slightly nicer, but I outlined in the source issue (#1343) that markdownlint (used by many tools) removes the double spaces from these lines automatically
Summary
Fixes template header fields rendering on a single line when trailing spaces are stripped by markdownlint (MD009 rule) or similar tools.
Before: Header fields use trailing double spaces for line breaks, which get stripped by linters
After: Header fields use blank lines, which are immune to linter auto-fix
Root Cause
This issue is caused by markdownlint's MD009 rule (no-trailing-spaces) which strips trailing whitespace from Markdown files.
markdownlint is widely integrated across the ecosystem:
Why blank lines are the better solution
Using blank lines instead of trailing spaces:
Test plan
spec-template.mdin GitHub - header fields should render on separate linesplan-template.mdin GitHub - header fields should render on separate linestasks-template.mdin GitHub - header fields should render on separate linesFixes #1343
🤖 Generated with Claude Code