Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 29, 2026

The test assertion in WordDocumentReaderTests.ReadAsync_ComplexDocument_PreservesStructureCorrectly hardcoded a Unix newline (\n), but the implementation uses StringBuilder.AppendLine() which emits Environment.NewLine (\r\n on Windows, \n on Unix).

Changes:

  • Updated test assertion to use Environment.NewLine instead of hardcoded \n
// Before
content.ShouldContain("# \n");

// After  
content.ShouldContain("# " + Environment.NewLine);

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: HowardvanRooijen <128664+HowardvanRooijen@users.noreply.github.com>
@HowardvanRooijen HowardvanRooijen marked this pull request as ready for review January 29, 2026 12:31
Copilot AI review requested due to automatic review settings January 29, 2026 12:31
Copilot AI changed the title [WIP] Update PR #7 based on review comments Fix platform-dependent newline in WordDocumentReader test assertion Jan 29, 2026
Copy link

Copilot AI left a 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 updates a test assertion in the WordDocumentReader tests to use Environment.NewLine instead of a hardcoded \n for improved platform compatibility.

Changes:

  • Updated test assertion at line 104 to use Environment.NewLine instead of hardcoded \n
  • Updated corresponding comment to reflect the change

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@HowardvanRooijen HowardvanRooijen merged commit d0269e4 into feature/issue-6 Jan 29, 2026
6 checks passed
@HowardvanRooijen HowardvanRooijen deleted the copilot/sub-pr-7 branch January 29, 2026 12:38
HowardvanRooijen added a commit that referenced this pull request Jan 30, 2026
* Enhance WordDocumentReader to preserve semantic structure

- Modified `WordDocumentReader` to detect "Heading1" through "Heading6" styles and prepend Markdown-style headers (`#` to `######`) to the text.
- Added code comments explaining the heading detection logic.
- Removed unused `HeaderRegex` from `SemanticChunker`.
- Added `WordDocumentReaderTests` to verify that document structure is preserved.

Fixes #6

* Add tests for WordDocumentReader to verify heading preservation in complex documents

* Fix platform-dependent newline in WordDocumentReader test assertion (#8)

* Initial plan

* Fix platform-dependent newline assertion in WordDocumentReaderTests

Co-authored-by: HowardvanRooijen <128664+HowardvanRooijen@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: HowardvanRooijen <128664+HowardvanRooijen@users.noreply.github.com>

* Add comprehensive tests for WordDocumentReader functionality and metadata extraction

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: HowardvanRooijen <128664+HowardvanRooijen@users.noreply.github.com>
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.

2 participants