summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-03-29 19:53:36 +0000
committerGitHub <noreply@github.com>2021-03-29 19:53:36 +0000
commit2e9a46c72967405808f88c4590d3fab970fed4dd (patch)
treee79bb0d4539b004cbbd3ba486019ee4f1db86b2b
parentaa96cb6739303a4bf76aeb6395e8ef79ff8ef0ee (diff)
parentcc0bcea4eafd355e49a2ea3f2470a647bdc9206c (diff)
downloadpodman-2e9a46c72967405808f88c4590d3fab970fed4dd.tar.gz
podman-2e9a46c72967405808f88c4590d3fab970fed4dd.tar.bz2
podman-2e9a46c72967405808f88c4590d3fab970fed4dd.zip
Merge pull request #9870 from edsantiago/manpage_doubledash_helper
[CI:DOCS] manpage xref: helpful diagnostic for unescaped dash-dash
-rwxr-xr-xhack/xref-helpmsgs-manpages9
1 files changed, 9 insertions, 0 deletions
diff --git a/hack/xref-helpmsgs-manpages b/hack/xref-helpmsgs-manpages
index 42dd3634f..25e972fbc 100755
--- a/hack/xref-helpmsgs-manpages
+++ b/hack/xref-helpmsgs-manpages
@@ -331,6 +331,15 @@ sub podman_man {
@most_recent_flags = ();
# As of PR #8292, all options are <h4> and anchored
if ($line =~ s/^\#{4}\s+//) {
+ # 2021-03: PR #9856: some (bleep) markdown processor converts
+ # double dashes to a single em-dash. We need to escape every
+ # instance with backslashes. This is anti-intuitive, and
+ # developers will naturally write --foo; try to catch that
+ # and warn with a helpful message.
+ if ($line =~ /--([a-z]+)/) {
+ warn "$ME: $subpath:$.: You probably need to backslash-escape '--$1' as '\\-\\-$1'\n";
+ }
+
# If option has long and short form, long must come first.
# This is a while-loop because there may be multiple long
# option names, e.g. --net/--network