Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## [Unreleased]

### Changed
* Replace `sprintf "<pre><code>"` (a format string with no format arguments) with the plain string literal `"<pre><code>"` in `HtmlFormatting.fs`. This is on the hot path invoked once per rendered code/output block, and avoids the unnecessary printf-format parsing overhead for a string with no substitutions.

### Removed
* Remove `docs/Dockerfile` (used for mybinder.org Binder integration) and mybinder badge links from documentation pages. The Binder integration relied on a deprecated .NET 7 SDK image and a deprecated `Microsoft.dotnet-interactive` version; mybinder.org support is discontinued.
* Remove `.ipynb` (Jupyter Notebook) "run in notebook" badge links from all documentation pages and delete `docs/img/badge-notebook.svg`. The links linked to `.ipynb` outputs generated by fsdocs, but .NET Interactive (which powered those notebooks) is deprecated and has no current replacement. The `.ipynb` output format itself is unchanged.
Expand Down
6 changes: 3 additions & 3 deletions src/FSharp.Formatting.Markdown/HtmlFormatting.fs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ let rec internal formatParagraph (ctx: FormattingContext) paragraph =
ctx.Writer.Write("<table class=\"pre\"><tr><td>")

if String.IsNullOrWhiteSpace(language) then
ctx.Writer.Write(sprintf "<pre><code>")
ctx.Writer.Write("<pre><code>")
else
let langCode = sprintf "language-%s" (htmlEncodeQuotes language)
ctx.Writer.Write(sprintf "<pre><code class=\"%s\">" langCode)
Expand All @@ -218,7 +218,7 @@ let rec internal formatParagraph (ctx: FormattingContext) paragraph =
if ctx.WrapCodeSnippets then
ctx.Writer.Write("<table class=\"pre\"><tr><td>")

ctx.Writer.Write(sprintf "<pre><code>")
ctx.Writer.Write("<pre><code>")
ctx.Writer.Write(htmlEncode code)
ctx.Writer.Write("</code></pre>")

Expand Down Expand Up @@ -315,7 +315,7 @@ let rec internal formatParagraph (ctx: FormattingContext) paragraph =
if ctx.WrapCodeSnippets then
ctx.Writer.Write("<table class=\"pre\"><tr><td>")

ctx.Writer.Write(sprintf "<pre><code>")
ctx.Writer.Write("<pre><code>")

for (code, _) in lines do
ctx.Writer.Write(htmlEncode code)
Expand Down
Loading