Skip to content

FOLLOW-UP: Add test for Windows line endings in frontmatter detection (from PR #145) #150

@adnaan

Description

@adnaan

Context

This follow-up task was identified during the review of PR #145.

Source PR: #145
PR Title: feat: auto-interactive markdown checkboxes
Suggested by: @claude-bot
Priority: Low

Task Description

The frontmatterPattern regex in auto_tasks.go uses \A---\n which requires exactly \n newlines. Files with \r\n line endings (Windows) won't match, causing the frontmatter to be processed as content and potentially breaking task list detection.

Tasks:

  1. Add unit test with \r\n line endings to confirm the behavior
  2. If it fails, update the regex to \A---\r?\n(.+?)\r?\n---\r?\n
  3. Consider if this also affects other regex patterns in the file

Original Comment

The frontmatterPattern uses \A---\n which requires exactly one newline. Files with \r\n line endings (Windows) or ---\r\n won't match.


This issue was automatically created by prmonitor from PR review comments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4-backlogBacklog: future, nice-to-havefollow-upFollow-up task from PR reviewfrom-reviewIssue originated from PR review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions