Conversation
Two bugs in MarkdownUtils.fs formatSpan/formatParagraph: 1. Emphasis (italic) was serialised as **...** (bold) instead of *...*, causing round-trip loss: *italic* → **italic** 2. Ordered list items used 0-based indexing with no period: "0 first", "1 second" instead of "1. first", "2. second" Fix both and add four regression tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dsyme
approved these changes
Mar 18, 2026
Contributor
|
@nojaf Nice fix by the bot! |
nojaf
approved these changes
Mar 18, 2026
Collaborator
|
/repo-assist release notes should always have a link to either a github issue or PR. Right now end-users can't piece your fix together with anything. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Author
|
Commit pushed:
|
Contributor
Author
|
🤖 This is an automated response from Repo Assist. Good catch,
I'll make sure every future release note entry includes a link from the start.
|
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This is an automated PR from Repo Assist.
Two bugs found and fixed in
Markdown.ToMd(theMarkdownUtils.fsserialiser):Bugs fixed
1.
Emphasisserialised as bold (**...**) instead of italic (*...*)formatSpanhad a copy-paste error:Round-trip before fix:
*italic*→**italic**(text becomes bold)2. Ordered list items use 0-based numbering with no period
formatParagraphusedList.indexed(0-based) and formatted as$"%i{n} ":Round-trip before fix:
1. first\n2. second→0 first\n1 secondTests added
Four new regression tests in
tests/FSharp.Markdown.Tests/Markdown.fs:ToMd preserves emphasis (italic) textToMd preserves emphasis distinct from strongToMd preserves an ordered list with correct numberingToMd ordered list does not use zero-based numberingTest Status
dotnet build FSharp.Formatting.sln --configuration Release— succeeded (1 pre-existing FS0760 warning)dotnet test FSharp.Formatting.sln --configuration Release --no-build— all 527 tests pass (281 Markdown, 30 CodeFormat, 8 fsdocs-tool, 120 Literate, 88 ApiDocs)dotnet fantomas src/FSharp.Formatting.Markdown/MarkdownUtils.fs tests/FSharp.Markdown.Tests/Markdown.fs --check— no formatting changes needed