Skip to content

[Repo Assist] test: add OutputBlock, AnchorLink, and code-block language specifier tests#1194

Draft
github-actions[bot] wants to merge 2 commits intomainfrom
repo-assist/test-outputblock-anchorlink-2026-04-29-f38ec86010d3f790
Draft

[Repo Assist] test: add OutputBlock, AnchorLink, and code-block language specifier tests#1194
github-actions[bot] wants to merge 2 commits intomainfrom
repo-assist/test-outputblock-anchorlink-2026-04-29-f38ec86010d3f790

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

🤖 This is an automated pull request from Repo Assist.

Summary

Adds four unit tests that cover previously-untested code paths in Markdown.ToMd and Markdown.ToHtml.

Motivation

The test file had several gaps:

  1. The existing ToMd preserves a fenced code block test verified only that the code body was preserved — it did not check that the language specifier (\``fsharp`) was kept in the output.

  2. OutputBlock (notebook execution output) was never exercised through unit tests. Two variants exist: text/html (emitted as raw HTML) and everything else (wrapped in a fenced code block). Without tests, either path could silently regress.

  3. AnchorLink is used by ApiDocs to emit in-page named anchors ((a name="...") (/a)). It had zero unit test coverage in Markdown.ToHtml.

Changes

tests/FSharp.Markdown.Tests/Markdown.fs — four new [(Test)] entries:

Test Verified path
ToMd preserves fenced code block language specifier language tag survives round-trip
ToMd serialises OutputBlock non-HTML as fenced code block OutputBlock("...", "text/plain", ...)\``...````
ToMd serialises OutputBlock HTML as raw HTML OutputBlock("...", "text/html", ...) → raw HTML, no fence
ToHtml renders AnchorLink as named anchor AnchorLink("id", ...)(a name="id")...(/a)

Test Status

Build: 0 errors
Tests: 350 / 350 FSharp.Markdown.Tests pass ✅ (4 new tests added)


Generated by 🌈 Repo Assist, see workflow run.

Generated by 🌈 Repo Assist, see workflow run. Learn more.

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@96b9d4c39aa22359c0b38265927eadb31dcf4e2a

Add four unit tests that cover previously-untested paths in
Markdown.ToMd and Markdown.ToHtml:

- ToMd preserves fenced code block language specifier (```fsharp)
- ToMd serialises OutputBlock non-HTML as a fenced code block
- ToMd serialises OutputBlock HTML as raw inline HTML (no fence)
- ToHtml renders AnchorLink as a named anchor element

All 350 FSharp.Markdown.Tests pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants