From: Todd Zullinger Date: Sat, 12 Sep 2026 19:15:00 GMT Subject: [PATCH 1/3] doc lint: match commands as well as options for synopsis style check Message-ID: <20260912191509.844954-2-tmz@pobox.com> In-Reply-To: <20260912191509.844954-1-tmz@pobox.com> Both `--option::` and `command::` should be backtick-quoted with the new synopsis style. Remove the requirement for a leading `-` from the regex which scans for these patterns. Avoid matching lines like `linkgit:git-diff[1]::` by replacing `.*` with `[^:]*` in the regex. Signed-off-by: Todd Zullinger --- Documentation/lint-documentation-style.perl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/lint-documentation-style.perl b/Documentation/lint-documentation-style.perl index d7ab732293..6eece11bdc 100755 --- a/Documentation/lint-documentation-style.perl +++ b/Documentation/lint-documentation-style.perl @@ -24,8 +24,8 @@ sub report { if ($line =~ /^\[synopsis\]$/) { $synopsis_style = 1; } - if (($line =~ /^(-[-a-z].*|<[-a-z0-9]+>(\.{3})?)(::|;;)$/) && ($synopsis_style)) { - report($line, "synopsis style and definition list item not backquoted"); + if (($line =~ /^([-a-z][^:]*|<[-a-z0-9]+>(\.{3})?)(::|;;)$/) && ($synopsis_style)) { + report($line, "synopsis style and definition list item not backquoted"); } } -- 2.56.0.rc0