E52A [Repo Assist] Add comprehensive Markdown.ToMd tests (16 new test cases) by github-actions[bot] · Pull Request #1097 · fsprojects/FSharp.Formatting · GitHub
[go: up one dir, main page]

Skip to content

[Repo Assist] Add comprehensive Markdown.ToMd tests (16 new test cases)#1097

Merged
nojaf merged 3 commits intomainfrom
repo-assist/improve-tomd-tests-2026-03-16-7684b2235d69d455
Mar 17, 2026
Merged

[Repo Assist] Add comprehensive Markdown.ToMd tests (16 new test cases)#1097
nojaf merged 3 commits intomainfrom
repo-assist/improve-tomd-tests-2026-03-16-7684b2235d69d455

Conversation

@github-actions
Copy link
Contributor

🤖 This is an automated PR from Repo Assist.

Problem

Markdown.ToMd — the round-trip Markdown-to-Markdown serialiser — had zero test coverage in the test suite. Any regression in MarkdownUtils.fs's formatSpan or formatParagraph functions would go undetected.

Changes

Added 16 new NUnit test cases to tests/FSharp.Markdown.Tests/Markdown.fs covering all the major span and paragraph types that ToMd currently handles:

Category What's tested
Block structure Plain paragraphs, H1/H2/H3 headings, horizontal rules
Inline spans Bold/strong, inline code, direct links, direct images
Lists Unordered lists
Code Fenced code blocks with language tag
Structure Blockquotes
Math LaTeX inline math ($...$)
HTML Inline HTML blocks
Tables Table with header and alignment row
Edge cases Empty document, indirect links (resolved to direct form)

A small toMd helper normalises newlines to \n and strips trailing whitespace so tests are platform-independent.

Test Status

  • dotnet build FSharp.Formatting.sln --configuration Release — succeeded (1 pre-existing FS0760 warning, unrelated)
  • dotnet test tests/FSharp.Markdown.Tests/275 passed (was 259; +16 new, 0 failed)
  • dotnet fantomas tests/FSharp.Markdown.Tests/Markdown.fs --check — no issues after formatting

Notes

Generated by Repo Assist ·

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@346204513ecfa08b81566450d7d599556807389f

Loading
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.

2 participants

0