Files
Tabish Bidiwale 604ecb8bd1 fix: normalize line endings in markdown parser to handle CRLF files (#79)
Fixes validation errors on Windows by normalizing CRLF/CR line endings
to LF before parsing sections. Adds comprehensive test coverage for
CRLF handling in both unit and integration tests.
2025-09-25 15:59:09 +10:00

737 B

1. Guard the regression

  • 1.1 Add a unit test that feeds a CRLF change document into MarkdownParser.parseChange and asserts Why/What Changes are detected.
  • 1.2 Add a CLI spawn/e2e test that writes a CRLF change, runs openspec validate, and expects success.

2. Normalize parsing

  • 2.1 Normalize line endings when constructing MarkdownParser so headers and content comparisons ignore \r.
  • 2.2 Ensure all CLI entry points (validate, view, spec conversion) reuse the normalized parser path.

3. Document and verify

  • 3.1 Update the cli-validate spec with a scenario covering CRLF line endings.
  • 3.2 Run the parser and CLI test suites (pnpm test, relevant spawn tests) to confirm the fix.