diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 08aa6011b..41a94ebb0 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,5 +1,9 @@ # Release Notes +## 8.1.11 - Apr 22 2026 + +- Code: `HtmlParser` `EmitTag` removes dead code in the `else` branch (the expression `x.HasFormattedParent || x.IsFormattedTag` was always equivalent to `x.HasFormattedParent` since `x.IsFormattedTag` is always `false` in that branch). Uses `name` directly to avoid re-computing `CurrentTagName()` for formatted/script tag checks. Also removes redundant `.ToLowerInvariant()` calls in `IsFormattedTag` and `IsScriptTag` since tag names are already lowercased at read time. + ## 8.1.10 - Apr 20 2026 - Performance: `HtmlCharRefs` entity lookup now uses a `Dictionary` instead of an F# `Map`, giving O(1) lookups instead of O(log n) for ~2230 HTML named-entity entries. Also avoids a repeated `char[]` allocation in the `TrimEnd` call inside the active pattern. diff --git a/src/AssemblyInfo.Csv.Core.fs b/src/AssemblyInfo.Csv.Core.fs index ca9103f98..704088dd6 100644 --- a/src/AssemblyInfo.Csv.Core.fs +++ b/src/AssemblyInfo.Csv.Core.fs @@ -5,13 +5,13 @@ open System.Reflection [] [] [] -[] -[] +[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "FSharp.Data.Csv.Core" let [] AssemblyProduct = "FSharp.Data" let [] AssemblyDescription = "Library of F# type providers and data access tools" - let [] AssemblyVersion = "8.1.10.0" - let [] AssemblyFileVersion = "8.1.10.0" + let [] AssemblyVersion = "8.1.11.0" + let [] AssemblyFileVersion = "8.1.11.0" diff --git a/src/AssemblyInfo.DesignTime.fs b/src/AssemblyInfo.DesignTime.fs index beeda0a2c..a6ab68697 100644 --- a/src/AssemblyInfo.DesignTime.fs +++ b/src/AssemblyInfo.DesignTime.fs @@ -5,13 +5,13 @@ open System.Reflection [] [] [] -[] -[] +[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "FSharp.Data.DesignTime" let [] AssemblyProduct = "FSharp.Data" let [] AssemblyDescription = "Library of F# type providers and data access tools" - let [] AssemblyVersion = "8.1.10.0" - let [] AssemblyFileVersion = "8.1.10.0" + let [] AssemblyVersion = "8.1.11.0" + let [] AssemblyFileVersion = "8.1.11.0" diff --git a/src/AssemblyInfo.Html.Core.fs b/src/AssemblyInfo.Html.Core.fs index b5b1b62cd..8b96c5f2d 100644 --- a/src/AssemblyInfo.Html.Core.fs +++ b/src/AssemblyInfo.Html.Core.fs @@ -5,13 +5,13 @@ open System.Reflection [] [] [] -[] -[] +[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "FSharp.Data.Html.Core" let [] AssemblyProduct = "FSharp.Data" let [] AssemblyDescription = "Library of F# type providers and data access tools" - let [] AssemblyVersion = "8.1.10.0" - let [] AssemblyFileVersion = "8.1.10.0" + let [] AssemblyVersion = "8.1.11.0" + let [] AssemblyFileVersion = "8.1.11.0" diff --git a/src/AssemblyInfo.Http.fs b/src/AssemblyInfo.Http.fs index 38b8b070a..edb61ddbc 100644 --- a/src/AssemblyInfo.Http.fs +++ b/src/AssemblyInfo.Http.fs @@ -5,13 +5,13 @@ open System.Reflection [] [] [] -[] -[] +[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "FSharp.Data.Http" let [] AssemblyProduct = "FSharp.Data" let [] AssemblyDescription = "Library of F# type providers and data access tools" - let [] AssemblyVersion = "8.1.10.0" - let [] AssemblyFileVersion = "8.1.10.0" + let [] AssemblyVersion = "8.1.11.0" + let [] AssemblyFileVersion = "8.1.11.0" diff --git a/src/AssemblyInfo.Json.Core.fs b/src/AssemblyInfo.Json.Core.fs index 73cb24591..57595f3e0 100644 --- a/src/AssemblyInfo.Json.Core.fs +++ b/src/AssemblyInfo.Json.Core.fs @@ -5,13 +5,13 @@ open System.Reflection [] [] [] -[] -[] +[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "FSharp.Data.Json.Core" let [] AssemblyProduct = "FSharp.Data" let [] AssemblyDescription = "Library of F# type providers and data access tools" - let [] AssemblyVersion = "8.1.10.0" - let [] AssemblyFileVersion = "8.1.10.0" + let [] AssemblyVersion = "8.1.11.0" + let [] AssemblyFileVersion = "8.1.11.0" diff --git a/src/AssemblyInfo.Runtime.Utilities.fs b/src/AssemblyInfo.Runtime.Utilities.fs index f2480a7bb..3707ecf0b 100644 --- a/src/AssemblyInfo.Runtime.Utilities.fs +++ b/src/AssemblyInfo.Runtime.Utilities.fs @@ -5,13 +5,13 @@ open System.Reflection [] [] [] -[] -[] +[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "FSharp.Data.Runtime.Utilities" let [] AssemblyProduct = "FSharp.Data" let [] AssemblyDescription = "Library of F# type providers and data access tools" - let [] AssemblyVersion = "8.1.10.0" - let [] AssemblyFileVersion = "8.1.10.0" + let [] AssemblyVersion = "8.1.11.0" + let [] AssemblyFileVersion = "8.1.11.0" diff --git a/src/AssemblyInfo.WorldBank.Core.fs b/src/AssemblyInfo.WorldBank.Core.fs index 70814c3be..38c89b67a 100644 --- a/src/AssemblyInfo.WorldBank.Core.fs +++ b/src/AssemblyInfo.WorldBank.Core.fs @@ -5,13 +5,13 @@ open System.Reflection [] [] [] -[] -[] +[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "FSharp.Data.WorldBank.Core" let [] AssemblyProduct = "FSharp.Data" let [] AssemblyDescription = "Library of F# type providers and data access tools" - let [] AssemblyVersion = "8.1.10.0" - let [] AssemblyFileVersion = "8.1.10.0" + let [] AssemblyVersion = "8.1.11.0" + let [] AssemblyFileVersion = "8.1.11.0" diff --git a/src/AssemblyInfo.Xml.Core.fs b/src/AssemblyInfo.Xml.Core.fs index e235dabf3..02059831f 100644 --- a/src/AssemblyInfo.Xml.Core.fs +++ b/src/AssemblyInfo.Xml.Core.fs @@ -5,13 +5,13 @@ open System.Reflection [] [] [] -[] -[] +[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "FSharp.Data.Xml.Core" let [] AssemblyProduct = "FSharp.Data" let [] AssemblyDescription = "Library of F# type providers and data access tools" - let [] AssemblyVersion = "8.1.10.0" - let [] AssemblyFileVersion = "8.1.10.0" + let [] AssemblyVersion = "8.1.11.0" + let [] AssemblyFileVersion = "8.1.11.0" diff --git a/src/AssemblyInfo.fs b/src/AssemblyInfo.fs index 88b5d75a0..56513e4c2 100644 --- a/src/AssemblyInfo.fs +++ b/src/AssemblyInfo.fs @@ -5,13 +5,13 @@ open System.Reflection [] [] [] -[] -[] +[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "FSharp.Data" let [] AssemblyProduct = "FSharp.Data" let [] AssemblyDescription = "Library of F# type providers and data access tools" - let [] AssemblyVersion = "8.1.10.0" - let [] AssemblyFileVersion = "8.1.10.0" + let [] AssemblyVersion = "8.1.11.0" + let [] AssemblyFileVersion = "8.1.11.0" diff --git a/src/FSharp.Data.Html.Core/HtmlParser.fs b/src/FSharp.Data.Html.Core/HtmlParser.fs index 2c83a391d..2940216ea 100644 --- a/src/FSharp.Data.Html.Core/HtmlParser.fs +++ b/src/FSharp.Data.Html.Core/HtmlParser.fs @@ -177,12 +177,16 @@ module internal HtmlParser = x.Tokens <- result :: x.Tokens member x.IsFormattedTag = - match x.CurrentTagName().ToLowerInvariant() with + // Tag names are already lowercased at read time (ConsTag applies ToLowerInvariant), + // so no need to call ToLowerInvariant here. + match x.CurrentTagName() with | "pre" -> true | _ -> false member x.IsScriptTag = - match x.CurrentTagName().ToLowerInvariant() with + // Tag names are already lowercased at read time (ConsTag applies ToLowerInvariant), + // so no need to call ToLowerInvariant here. + match x.CurrentTagName() with | "script" | "style" -> true | _ -> false @@ -200,15 +204,15 @@ module internal HtmlParser = else Tag(false, name, x.GetAttributes()) - // pre is the only default formatted tag, nested pres are not - // allowed in the spec. - if x.IsFormattedTag then + // "pre" is the only default formatted tag; nested pre elements are not + // allowed in the spec. Use `name` directly to avoid re-computing CurrentTagName(). + // The else branch (x.HasFormattedParent <- x.HasFormattedParent || false) was a + // no-op and has been removed. + if name = "pre" then x.HasFormattedParent <- not isEnd - else - x.HasFormattedParent <- x.HasFormattedParent || x.IsFormattedTag x.InsertionMode <- - if x.IsScriptTag && (not isEnd) then + if (name = "script" || name = "style") && (not isEnd) then ScriptMode else DefaultMode