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")