FSharp.Formatting.Literate
22.0.1
dotnet add package FSharp.Formatting.Literate --version 22.0.1
NuGet\Install-Package FSharp.Formatting.Literate -Version 22.0.1
<PackageReference Include="FSharp.Formatting.Literate" Version="22.0.1" />
<PackageVersion Include="FSharp.Formatting.Literate" Version="22.0.1" />
<PackageReference Include="FSharp.Formatting.Literate" />
paket add FSharp.Formatting.Literate --version 22.0.1
#r "nuget: FSharp.Formatting.Literate, 22.0.1"
#:package FSharp.Formatting.Literate@22.0.1
#addin nuget:?package=FSharp.Formatting.Literate&version=22.0.1
#tool nuget:?package=FSharp.Formatting.Literate&version=22.0.1
The package is a collection of libraries that can be used for literate programming
with F# (great for building documentation) and for generating library documentation
from inline code comments. The key components are Markdown parser, tools for formatting
F# code snippets, including tool tip type information and a tool for generating
documentation from library metadata.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- FSharp.Compiler.Service (= 43.12.203)
- FSharp.Core (= 10.1.203)
- System.Text.Json (>= 10.0.7)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on FSharp.Formatting.Literate:
| Package | Downloads |
|---|---|
|
FSharp.Formatting.ApiDocs
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 22.0.1 | 0 | 5/9/2026 |
| 22.0.0 | 104 | 4/4/2026 |
| 22.0.0-alpha.3 | 58 | 4/2/2026 |
| 22.0.0-alpha.2 | 64 | 3/13/2026 |
| 22.0.0-alpha.1 | 55 | 3/5/2026 |
| 21.0.0 | 335 | 11/12/2025 |
| 21.0.0-beta-005 | 236 | 4/23/2025 |
| 21.0.0-beta-004 | 163 | 11/20/2024 |
| 21.0.0-beta-003 | 210 | 8/16/2024 |
| 21.0.0-beta-002 | 203 | 6/19/2024 |
| 21.0.0-beta-001 | 187 | 6/6/2024 |
| 20.0.1 | 304 | 5/31/2024 |
| 20.0.0 | 269 | 2/14/2024 |
| 20.0.0-beta-002 | 245 | 2/8/2024 |
| 20.0.0-beta-001 | 196 | 1/31/2024 |
| 20.0.0-alpha-019 | 184 | 1/29/2024 |
| 20.0.0-alpha-018 | 231 | 1/10/2024 |
| 20.0.0-alpha-017 | 210 | 1/9/2024 |
| 20.0.0-alpha-016 | 263 | 12/7/2023 |
| 20.0.0-alpha-015 | 174 | 12/6/2023 |
### 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.