Skip to content

Conversation

@blucyk
Copy link

@blucyk blucyk commented Jan 1, 2026

Summary

Markdown files created on Windows use CRLF (\r\n) line endings, which caused the regex patterns in parseProductOverview and parseProductRoadmap to fail matching section headers.

This fix normalizes line endings to LF (\n) before parsing, ensuring cross-platform compatibility.

Problem

Using Cursor on Windows, markdown files (product-overview.md, product-roadmap.md) are saved with CRLF (\r\n) line endings. The regex patterns in parseProductOverview and parseProductRoadmap use \n to match newlines, causing the patterns to fail on Windows systems.

This results in the Sections page showing "No roadmap defined yet" even when product-roadmap.md exists and is properly formatted.

Solution

Added line ending normalization (md.replace(/\r\n/g, '\n')) at the start of both parser functions before regex matching. This ensures cross-platform compatibility without changing the regex patterns.

Documented steps to test

  1. Create a new Design OS project (in Cursor?) on Windows
  2. Run /product-vision to create product/product-overview.md
  3. Run /product-roadmap to create product/product-roadmap.md with 3+ sections
  4. Verify files have CRLF line endings: git ls-files --eol | grep product
  5. Start the dev server: npm run dev
  6. Navigate to the Sections page (/sections)
  7. Verify all roadmap sections display correctly (not "No roadmap defined yet")
  8. Both parsers now correctly parse files regardless of line ending format

Notes for reviewers

(Sorry for not opening a discussion, just wanted to quickly pass along the fix I used to get past my issue)

Markdown files created on Windows use CRLF (\\r\\n) line endings, which
caused the regex patterns in parseProductOverview and parseProductRoadmap
to fail matching section headers.

This fix normalizes line endings to LF (\\n) before parsing, ensuring
cross-platform compatibility.
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.

1 participant