From 8ed31f13c45142b7ac85ac70cefbb28b19fc1e38 Mon Sep 17 00:00:00 2001 From: Jared Dillard Date: Sun, 18 May 2025 18:11:20 -0700 Subject: [PATCH] strip whitespace from summary --- sphinx_llms_txt/writer.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sphinx_llms_txt/writer.py b/sphinx_llms_txt/writer.py index 6f181cc..45af50d 100644 --- a/sphinx_llms_txt/writer.py +++ b/sphinx_llms_txt/writer.py @@ -86,6 +86,8 @@ class FileWriter: # Add description if available description = self.config.get("llms_txt_summary", "") if description: + # Trim leading and trailing whitespace + description = description.strip() f.write(f"> {description}\n\n") f.write("## Docs\n\n")