From 148153d16c927bba8ea21acbd43a821c20c66a02 Mon Sep 17 00:00:00 2001 From: nojaf Date: Wed, 29 Nov 2023 17:38:30 +0100 Subject: [PATCH 1/3] Filter out non empty newlines for readXmlElementAsSingleSummary --- src/FSharp.Formatting.ApiDocs/GenerateModel.fs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/FSharp.Formatting.ApiDocs/GenerateModel.fs b/src/FSharp.Formatting.ApiDocs/GenerateModel.fs index a544ce352..5a8eaa593 100644 --- a/src/FSharp.Formatting.ApiDocs/GenerateModel.fs +++ b/src/FSharp.Formatting.ApiDocs/GenerateModel.fs @@ -1849,7 +1849,10 @@ module internal SymbolReader = /// Wraps the summary content in a
 tag if it is multiline and has different column indentations.
     let readXmlElementAsSingleSummary (e: XElement) =
         let text = e.Value
-        let nonEmptyLines = e.Value.Split([| '\n' |], StringSplitOptions.RemoveEmptyEntries)
+
+        let nonEmptyLines =
+            e.Value.Split([| '\n' |], StringSplitOptions.RemoveEmptyEntries)
+            |> Array.filter (String.IsNullOrWhiteSpace >> not)
 
         if nonEmptyLines.Length = 1 then
             nonEmptyLines.[0]

From 99fdf076738682f2a6471edba4b856f33190fcd1 Mon Sep 17 00:00:00 2001
From: nojaf 
Date: Wed, 29 Nov 2023 17:38:47 +0100
Subject: [PATCH 2/3] Add scrollbar to fsdocs-xmldoc pre.

---
 docs/content/fsdocs-default.css | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/docs/content/fsdocs-default.css b/docs/content/fsdocs-default.css
index 6c7ba40e5..606421c93 100644
--- a/docs/content/fsdocs-default.css
+++ b/docs/content/fsdocs-default.css
@@ -756,7 +756,9 @@ pre.fssnip.highlighted > code, table.pre .fssnip, table.pre .fssnip code {
 }
 
 /* Custom scrollbar styling */
-body, aside, #menu-toggle .menu, table.pre, code, .fsdocs-entity-xmldoc > div > pre, div.fsdocs-summary > pre, dialog ul, div.fsdocs-tip {
+body, aside, #menu-toggle .menu, table.pre, code, 
+.fsdocs-entity-xmldoc > div > pre, div.fsdocs-summary > pre, 
+dialog ul, div.fsdocs-tip, .fsdocs-xmldoc > pre {
     overflow-x: auto;
     max-width: 100%;
 
@@ -775,7 +777,9 @@ body, aside, #menu-toggle .menu, table.pre, code, .fsdocs-entity-xmldoc > div >
     }
 }
 
-body, aside, #menu-toggle .menu, table.pre, code, .fsdocs-entity-xmldoc > div > pre, div.fsdocs-summary > pre, dialog ul, div.fsdocs-tip {
+body, aside, #menu-toggle .menu, table.pre, code, 
+.fsdocs-entity-xmldoc > div > pre, div.fsdocs-summary > pre, 
+dialog ul, div.fsdocs-tip, .fsdocs-xmldoc > pre {
     @media screen and (min-width: 768px) {
         &::-webkit-scrollbar {
             height: var(--spacing-200);
@@ -988,6 +992,12 @@ span[onmouseout] {
     margin-top: 0;
 }
 
+.fsdocs-xmldoc {
+    & pre {
+        overflow-x: auto;
+    }
+}
+
 .table {
     width: 100%;
     table-layout: fixed;

From a0d2e44859ed17330bdb27708d5f437afae4ff15 Mon Sep 17 00:00:00 2001
From: nojaf 
Date: Wed, 29 Nov 2023 17:39:42 +0100
Subject: [PATCH 3/3] Add changelog entry.

---
 RELEASE_NOTES.md | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index ec6ca06b3..6bb45119c 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -1,5 +1,10 @@
 # Changelog
 
+## Unreleased
+
+### Fixed
+* Namespace description overflows content box. [#886](https://github.com/fsprojects/FSharp.Formatting/issues/886)
+
 ## 20.0.0-alpha-014 - 2023-11-22
 
 ### Added