Skip to content

Commit 100dd42

Browse files
github-actions[bot]Copilotdsyme
authored
[Repo Assist] Fix HtmlElement SVG serialisation: LinearGradient/RadialGradient emitted invalid tag (radient) (#1108)
* Fix HtmlElement SVG serialisation: LinearGradient and RadialGradient emitted wrong tag name 'radient' Both LinearGradient and RadialGradient cases in HtmlElement.ToString() were passing the literal string "radient" to the format helper instead of "linearGradient" and "radialGradient" respectively. This meant that any SVG element using these types would render as the invalid tag <radient> in generated HTML. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * ci: trigger checks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Don Syme <dsyme@users.noreply.github.com>
1 parent 3380bbc commit 100dd42

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

RELEASE_NOTES.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@
2020
* Add missing `[<Test>]` attribute on `Can include-output-and-it` test so it is executed by the test runner.
2121
* Add regression test confirming that types whose name matches their enclosing namespace are correctly included in generated API docs. [#944](https://github.com/fsprojects/FSharp.Formatting/issues/944)
2222
* Fix crash (`failwith "tbd - IndirectImage"`) when `Markdown.ToMd` is called on a document containing reference-style images with bracket syntax. The indirect image is now serialised as `![alt](url)` when the reference is resolved, or in bracket notation when it is not. [#1094](https://github.com/fsprojects/FSharp.Formatting/pull/1094)
23-
* Fix `Markdown.ToMd` serialising italic spans with asterisks incorrectly as bold spans. [#1102](https://github.com/fsprojects/FSharp.Formatting/pull/1102)
24-
* Fix `Markdown.ToMd` serialising ordered list items with incorrect numbering and formatting. [#1102](https://github.com/fsprojects/FSharp.Formatting/pull/1102)
23+
* Fix `Markdown.ToMd` serialising `*emphasis*` (italic) spans as `**...**` (bold) instead of `*...*`. [#1102](https://github.com/fsprojects/FSharp.Formatting/pull/1102)
24+
* Fix `Markdown.ToMd` serialising ordered list items with 0-based numbering and no period (e.g. `0 first`) instead of 1-based with a period (e.g. `1. first`). [#1102](https://github.com/fsprojects/FSharp.Formatting/pull/1102)
25+
* Fix `HtmlElement` SVG serialisation: `LinearGradient` now renders as `<linearGradient>` and `RadialGradient` now renders as `<radialGradient>` — both previously emitted the invalid tag `<radient>`.
2526

2627
### Changed
2728
* `fsdocs build` now pre-computes the navigation menu structure (filter/group/sort) once per build rather than once per output page, reducing work from O(n²) to O(n) for sites with n pages. The filesystem check for custom menu templates is also cached per build. [#1129](https://github.com/fsprojects/FSharp.Formatting/pull/1129)

src/FSharp.Formatting.Common/HtmlModel.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,13 +594,13 @@ type internal HtmlElement =
594594
| G(props, children) -> format "g" props children level
595595
| Image(props, children) -> format "image" props children level
596596
| Line(props, children) -> format "line" props children level
597-
| LinearGradient(props, children) -> format "radient" props children level
597+
| LinearGradient(props, children) -> format "linearGradient" props children level
598598
| Mask(props, children) -> format "mask" props children level
599599
| Path(props, children) -> format "path" props children level
600600
| Pattern(props, children) -> format "pattern" props children level
601601
| Polygon(props, children) -> format "polygon" props children level
602602
| Polyline(props, children) -> format "polyline" props children level
603-
| RadialGradient(props, children) -> format "radient" props children level
603+
| RadialGradient(props, children) -> format "radialGradient" props children level
604604
| Rect(props, children) -> format "rect" props children level
605605
| Stop(props, children) -> format "stop" props children level
606606
| Text(props, children) -> format "text" props children level

0 commit comments

Comments
 (0)