From da7ee680769e53978b630c03ad12adf6261196e1 Mon Sep 17 00:00:00 2001 From: Jared Dillard Date: Sun, 18 May 2025 18:17:30 -0700 Subject: [PATCH] support multi-line summaries --- sphinx_llms_txt/writer.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sphinx_llms_txt/writer.py b/sphinx_llms_txt/writer.py index 45af50d..8d45eea 100644 --- a/sphinx_llms_txt/writer.py +++ b/sphinx_llms_txt/writer.py @@ -88,6 +88,9 @@ class FileWriter: if description: # Trim leading and trailing whitespace description = description.strip() + # Replace newlines with newline + blockquote marker to maintain + # blockquote formatting + description = description.replace("\n", "\n> ") f.write(f"> {description}\n\n") f.write("## Docs\n\n")