fsdocs-tool 22.0.1

dotnet tool install --global fsdocs-tool --version 22.0.1
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local fsdocs-tool --version 22.0.1
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=fsdocs-tool&version=22.0.1
                    
nuke :add-package fsdocs-tool --version 22.0.1
                    

The 'dotnet fsdocs' documentation generation tool for F# projects. Install use 'dotnet tool add fsdocs-tool'. See the project site for documentation.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
22.0.1 140 5/9/2026
22.0.0 1,113 4/4/2026
22.0.0-alpha.3 330 4/2/2026
22.0.0-alpha.2 1,006 3/13/2026
22.0.0-alpha.1 60 3/5/2026
21.0.0 13,893 11/12/2025
21.0.0-beta-005 3,082 4/23/2025
21.0.0-beta-004 1,823 11/20/2024
21.0.0-beta-003 590 8/16/2024
21.0.0-beta-002 8,856 6/19/2024
21.0.0-beta-001 1,912 6/6/2024
20.0.1 42,934 5/31/2024
20.0.0 8,753 2/14/2024
20.0.0-beta-002 1,428 2/8/2024
20.0.0-beta-001 838 1/31/2024
20.0.0-alpha-019 623 1/29/2024
20.0.0-alpha-018 5,640 1/10/2024
20.0.0-alpha-017 460 1/9/2024
20.0.0-alpha-016 1,809 12/7/2023
20.0.0-alpha-015 296 12/6/2023
Loading failed

### Changed

- Compile `Regex` instances to module-level singletons (with `RegexOptions.Compiled`) in `PageContentList`, `HtmlFormatting`, `Formatting`, `Menu`, and `LlmsTxt`. Previously a new, uncompiled `Regex` was constructed on every call (once per page heading, once per HTML page, once per menu item, once per llms.txt entry), incurring repeated JIT overhead. The patterns are now compiled once at module load and reused across all calls.
- Replace deprecated `System.Net.WebClient` with `System.Net.Http.HttpClient` in the image downloader used by `--saveimages`. Removes the `#nowarn "44"` suppression.
- Bump `Newtonsoft.Json` transitive-dependency pin from 13.0.3 to 13.0.4.
- Bump `System.Memory` transitive-dependency pin from 4.5.5 to 4.6.3.0
- Remove stale `VersionOverride="43.12.201"` on the `FSharp.Compiler.Service` reference in `FSharp.Formatting.Markdown.fsproj`; the package now uses the central pin (`43.12.202`) from `Directory.Packages.props`, eliminating the NU1605 build warning.
- Replace `Enumerable.Cast<XAttribute>` (LINQ) with `Seq.cast<XAttribute>` (idiomatic F#) in `MarkdownUtils.fs`, removing the `open System.Linq` import.

### Fixed

- Fix `Markdown.ToMd` serialising table data rows with a hardcoded `/n` line separator instead of the configured newline. On Windows (where `Environment.NewLine` is `/r/n`) this produced mixed line endings in the output. Each data row is now yielded separately, consistent with how every other paragraph type works. The trailing blank line after a table was also emitting a literal `"/n"` string instead of the standard `""` empty-line sentinel.
- Fix `Markdown.ToFsx` hardcoding a `/n` newline in the `(* output: ...)` comment wrapper around code-cell outputs. The configured `ctx.Newline` is now used, ensuring consistent line endings on Windows.
- Fix `Markdown.ToMd` silently dropping YAML frontmatter when serialising a parsed `MarkdownDocument` back to Markdown text. Frontmatter is now preserved with its `---` delimiters.
- Fix `Markdown.ToMd` converting tight lists (no blank lines between items) into loose lists by emitting a blank line after every item. Tight lists now round-trip correctly without inter-item blank lines.
- Fix `Markdown.ToMd` serialising `HardLineBreak` as a bare newline instead of two trailing spaces + newline. The correct CommonMark representation `"  /n"` is now emitted, so hard line breaks survive a round-trip through `ToMd`.
- Fix `Markdown.ToMd` serialising `HorizontalRule` as 23 hyphens regardless of the character used in the source. It now emits exactly three characters matching the parsed character (`---`, `***`, or `___`), giving faithful round-trips.
- Remove stray `printfn` debug output emitted to stdout when `Markdown.ToMd` encountered an unrecognised paragraph type.
- Fix `Markdown.ToLatex` producing invalid LaTeX output for level-6 (and deeper) headings. Previously the LaTeX command was an empty string, resulting in bare `{content}` without a command prefix. Headings at level 6+ are now serialised as `/subparagraph{...}`, which is the deepest sectioning command available in LaTeX.
- Fix `Markdown.ToMd` silently dropping `EmbedParagraphs` nodes: the serialiser now delegates to the node's `Render()` method and formats the resulting paragraphs, consistent with the HTML and LaTeX back-ends.
- Fix `Markdown.ToMd` dropping link titles in `DirectLink` and `DirectImage` spans. Links with a title attribute (e.g. `[text](url "title")`) now round-trip correctly; without this fix the title was silently discarded on serialisation.
- Fix `Markdown.ToMd` serialising inline code spans that contain backtick characters. Previously, `InlineCode` was always wrapped in single backticks, producing syntactically incorrect Markdown when the code body contained backticks. Now the serialiser selects the shortest backtick fence that does not collide with the body content (e.g. a double-backtick fence for bodies containing single backticks, triple for double, etc.), matching the CommonMark spec.
- Fix `Markdown.ToMd` multi-paragraph blockquote round-trip. The old code emitted a bare blank line between inner paragraphs, which CommonMark parses as closing the blockquote, resulting in multiple separate blockquotes on re-parse. Paragraph separators inside a blockquote are now emitted as `>` (an empty blockquote continuation line) so the round-trip preserves a single `QuotedBlock`.
- Fix `Markdown.ToMd` serialising unresolved indirect links as `[body](key)` (treating the reference key as a URL) instead of the correct `[body][key]` form. Unresolved indirect links are now preserved in their original indirect-reference form, consistent with how unresolved indirect images are handled.
- Fix `Markdown.ToMd` silently dropping `AnchorLink` spans. Named anchors (used by the API documentation generator to create in-page navigation targets) are now serialised as `<a name="..."></a>` inline HTML, so they survive a round-trip and remain functional when the output is later converted to HTML.

### Added

- Introduce `--panel-background` and `--panel-border` CSS custom properties in `fsdocs-default.css`. These decouple panel/component colours (copy-code button, blockquotes, sidebar, page menu, dialogs, tooltips, API tables) from `--header-background`/`--header-border`. Both variables default to the header values, so existing themes are unaffected; themes that need a different colour for content panels can now override `--panel-background` and `--panel-border` independently. [#1156](https://github.com/fsprojects/FSharp.Formatting/issues/1156)
- Add tests for `Markdown.ToFsx` (direct serialisation to F# script format), which previously had no unit test coverage.
- Add tests for `Markdown.ToPynb` (direct serialisation to Jupyter notebook format), which previously had no unit test coverage.
- Add round-trip tests for `HardLineBreak` and `HorizontalRule` character preservation in `Markdown.ToMd`.
- Add direct unit tests for `Markdown.ToLatex`, which previously had no unit test coverage. Tests cover headings (all six levels), inline formatting (bold, italic, inline code), links, images with captions, lists (ordered and unordered), code blocks, blockquotes, tables with bold headers, horizontal rules, LaTeX special character escaping, inline math, and display math.