git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Fix multi-paragraph list items in OPTIONS section

From
Jonas Fonseca <fonseca@diku.dk>
Date
Mar 19, 2006, 23:39 UTC
Message-ID
<20060319233946.GB22802@diku.dk>

Asciidoc cannot handle multi-paragraph description list items without the need for adding special control characters and reindenting all paragraphs but the first. Workaround it in make-cg-asciidoc so that the documentation in the script headers can use the more intuitive and readable formatting.

Affected files are cg-patch and cg-commit.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---
 Documentation/make-cg-asciidoc |   25 ++++++++++++++++++++++++-
 1 files changed, 24 insertions(+), 1 deletions(-)
diff --git a/Documentation/make-cg-asciidoc b/Documentation/make-cg-asciidoc
index 126d4eb..c454062 100755
--- a/Documentation/make-cg-asciidoc
+++ b/Documentation/make-cg-asciidoc
@@ -112,8 +112,31 @@ $DESCRIPTION
 
 OPTIONS
 -------
-$OPTIONS
+
+--
+__END__
+
+# Only indent the first paragraph of multi-paragraph list items.
+multipara=
+echo "$OPTIONS" | while read line; do
+	case "$line" in
+	*::)
+		multipara=
+		;;
+	"")
+		multipara=t
+		;;
+	*)
+		[ "$multipara" ] || line="	$line"
+	esac
+
+	echo "$line"
+done
+
+cat <<__END__
+
 $HELP_OPTIONS
+--
 
 $MISC
 
-- 
Jonas Fonseca
Message 1 of 1 in “Fix multi-paragraph list items in OPTIONS section”
  1. Fix multi-paragraph list items in OPTIONS sectionJonas Fonseca, Mar 19, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.