From 8c01eec8bcb5a7133bf557472191fd17b5c78910 Mon Sep 17 00:00:00 2001
From: Miguel Angel Reina Ortega <miguelangel.reinaortega@etsi.org>
Date: Tue, 17 Sep 2024 11:27:20 +0200
Subject: [PATCH] Including hanging paragraphs and a note to fix them

---
 spec_on_pages.sh     | 2 +-
 toMkdocs/toMkdocs.py | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/spec_on_pages.sh b/spec_on_pages.sh
index 002e0c3..afb68b1 100644
--- a/spec_on_pages.sh
+++ b/spec_on_pages.sh
@@ -39,7 +39,7 @@ git checkout $7
 
 ####### GENERATE NAV SPEC #######
 echo "------ Generate input for mkdocs --------"
-python3 $1 -it --title ${9^^} "./$8.md"
+python3 $1 -it -ihp --title ${9^^} "./$8.md"
 echo "------ Move to docs folder --------"
 mv ${9^^}/* docs/
 sed -i 's/'${9^^}'\///g' _nav.yml
diff --git a/toMkdocs/toMkdocs.py b/toMkdocs/toMkdocs.py
index 9277e2b..34b414f 100644
--- a/toMkdocs/toMkdocs.py
+++ b/toMkdocs/toMkdocs.py
@@ -344,6 +344,8 @@ def prepareForMkdocs(clauses:list[Clause], includeHangingParagraphs:bool = False
 				print(f'[yellow]Hanging paragraph in clause "{clause.title}" {"(removed)" if not includeHangingParagraphs else "(kept)"}')
 				if not includeHangingParagraphs:
 					clauses[i].lines = []
+				else:
+					clauses[i].lines = [Line("<mark>Editor note: This is a hanging paragraph and it must be moved to its own clause</mark>")] + clauses[i].lines
 
 	# Repair wrong markdown for indented lines.
 	# Add 2 spaces to existing 2-space indentions
-- 
GitLab