Skip to content

fix: readDescription returns first non-heading line regardless of heading position#199

Merged
claude[bot] merged 1 commit intomainfrom
claude/issue-196-20260228-0432
Feb 28, 2026
Merged

fix: readDescription returns first non-heading line regardless of heading position#199
claude[bot] merged 1 commit intomainfrom
claude/issue-196-20260228-0432

Conversation

@claude
Copy link
Contributor

@claude claude bot commented Feb 28, 2026

Summary

Fixes a bug in readDescription where README content appearing before the first # heading was silently skipped.

Root cause: The function used a pastHeading flag and only returned a line if a heading had previously been seen. READMEs with descriptive text before any heading (a very common pattern) would never match.

Fix: Remove the pastHeading guard. Skip heading lines (#-prefixed), and return the first non-empty, non-heading line unconditionally — whether it appears before or after a heading.

Closes #196

Generated with Claude Code

…ding position

Previously, the function required a heading to appear before returning any
description line, causing README content that precedes the first heading to
be silently skipped.

Fixes #196

Co-Authored-By: Grey Newell <greyshipscode@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@claude claude bot merged commit 7c9cf70 into main Feb 28, 2026
1 check passed
@claude claude bot deleted the claude/issue-196-20260228-0432 branch February 28, 2026 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: readDescription skips README content that appears before the first heading

0 participants