Skip to content

[Doc] Preserve migration tables when removing front matter - #5432

Merged
Vincent Baaij (vnbaaij) merged 6 commits into
microsoft:devfrom
minwookshin:fix/docviewer-migration-tables
Oct 14, 2026
Merged

Vincent Baaij (vnbaaij) merged 6 commits into
microsoft:devfrom
minwookshin:fix/docviewer-migration-tables

Conversation

@minwookshin

@minwookshin Minwook Shin (minwookshin) commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

📖 Description

Fixed front matter removal stripping table separators from the migration docs. Only the leading front matter block is removed now; tables, horizontal rules, and fenced examples are preserved.

Fixes #5393.

📑 Test Plan

  • Added inline Markdown cases covering table rendering, horizontal rules, fenced examples, incomplete front matter, LF/CRLF, and a closing delimiter at EOF. Five regression cases fail with the original pattern; all 24 DocViewer tests pass with the fix.
  • Full solution Debug build: no warnings or errors.
  • The full DocViewer, DocApiGen, DocApiGen integration, Core, Charts, and MCP run passed before the review revision. Rebuilt and reran DocViewer after replacing resource fixtures with inline strings: 24 passed, no build warnings or errors.

✅ Checklist

  • I have added tests for my changes.
  • I have tested my changes.
  • I have read the contribution guidelines and followed the project standards.

Assisted by Codex.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The anchored replacement addresses the reported corruption and is covered by focused regression cases.

0 open findings

What changed in this PR

Fixes migration documentation rendering by limiting front matter removal to the leading standalone-delimited block.

Changes:

  • Anchors front matter removal to the document start.
  • Adds five regression cases covering tables, horizontal rules, fenced examples, and incomplete headers.
  • Embeds representative migration documents as test resources.
File Description
examples/​Tools/​FluentUI.Demo.DocViewer/​Services/​DocViewerService.cs Restricts front matter removal.
examples/​Tools/​FluentUI.Demo.DocViewer.Tests/​Services/​DocViewerServiceTests.cs Adds regression tests.
examples/​Tools/​FluentUI.Demo.DocViewer.Tests/​Resources/​WithoutHeaders.md Tests preserved headerless Markdown.
examples/​Tools/​FluentUI.Demo.DocViewer.Tests/​Resources/​WithHeaders.md Tests body preservation after front matter.
examples/​Tools/​FluentUI.Demo.DocViewer.Tests/​Resources/​UnclosedHeaders.md Tests incomplete front matter preservation.
examples/​Tools/​FluentUI.Demo.DocViewer.Tests/​FluentUI.Demo.DocViewer.Tests.csproj Embeds test and migration resources.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@dvoituron Denis Voituron (dvoituron) changed the title fix: preserve migration tables when removing front matter [Doc] Preserve migration tables when removing front matter Oct 12, 2026
@minwookshin

Copy link
Copy Markdown
Contributor Author

Shared front-matter parsing between pages and includes, with CR/LF/CRLF regression coverage. Rebased on dev; the full solution builds and all 6,225 tests pass.

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.

fix: migration table in docs

4 participants