From: Alan T. DeKok Date: Tue, 9 Jun 2026 06:09:46 +0000 (+0300) Subject: Update to support ** and *** lists X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc8ebe232dda17ae2ee08337b31c781e2a96926f;p=thirdparty%2Ffreeradius-server.git Update to support ** and *** lists --- diff --git a/doc/wrap.md b/doc/wrap.md index d489653f758..5b2bfcc2da4 100644 --- a/doc/wrap.md +++ b/doc/wrap.md @@ -4,7 +4,8 @@ The "*.adoc" files should have all text paragraphs wrapped at 80 columns. If there are multiple blank lines in a row, then the output should -contain only one blank line. +contain only one blank line. If there are blank lines at the end of +the file, they should be removed. Trailing spaces on lines should be removed. @@ -41,12 +42,12 @@ wrapped. Paragraphs should have a blank line between them. -List entries are lines that start with "* " or "- ". They should be -wrapped individually. That is, each list entry should be word wrapped -all by itself, and should not include text from other list entries. -If a list entry spans multiple lines, the second line should be -indented another 2 spaces, so that it is aligned with the text, and -not with the leading "* ". +List entries are lines that start with "* " ("** " or "*** "), or "- +". They should be wrapped individually. That is, each list entry +should be word wrapped all by itself, and should not include text from +other list entries. If a list entry spans multiple lines, the second +line should be indented another 2 spaces, so that it is aligned with +the text, and not with the leading "* ". Numbered list entries are lines that start with a number, followed by a dot. e.g. "1.". Those list entries should be word wrapped just diff --git a/scripts/asciidoc/wrap.py b/scripts/asciidoc/wrap.py index 13282c8718d..174bb4d267b 100755 --- a/scripts/asciidoc/wrap.py +++ b/scripts/asciidoc/wrap.py @@ -23,10 +23,11 @@ Rules: - Lines that start with "[" (e.g. "[NOTE]", "[source,c]") are left unchanged on their own line. - Lines starting with "|" (tables) are left unchanged. - - List entries begin with "* " or "- ", or with a number followed by - "." (e.g. "1."). Each entry is wrapped on its own; continuation - lines are indented so they align with the text after the marker. - For numbered entries the leading number is preserved as-is. + - List entries begin with one to four "*" markers ("* ", "** ", + "*** ", "**** "), with "- ", or with a number followed by "." + (e.g. "1."). Each entry is wrapped on its own; continuation lines + are indented so they align with the text after the marker. For + numbered entries the leading number is preserved as-is. $Id$ """ @@ -105,7 +106,7 @@ def is_comment(line): return line.lstrip().startswith("//") -_LIST_MARKER_RE = re.compile(r"^(?:[*-]|\d+\.)\s+") +_LIST_MARKER_RE = re.compile(r"^(?:\*{1,4}|-|\d+\.)\s+") def list_marker_len(line):