diff options
author | Paul Holzinger <paul.holzinger@web.de> | 2021-05-07 18:30:00 +0200 |
---|---|---|
committer | Paul Holzinger <paul.holzinger@web.de> | 2021-05-07 18:30:00 +0200 |
commit | 30e731ecc8e439d038bbd2b7ab964a980579acf8 (patch) | |
tree | f17f242dca7395f83cbe7cc5aff22adf37bcc9d8 /hack | |
parent | 5616887f62b4bed1031cdade8bd602bc2cb9d8f4 (diff) | |
download | podman-30e731ecc8e439d038bbd2b7ab964a980579acf8.tar.gz podman-30e731ecc8e439d038bbd2b7ab964a980579acf8.tar.bz2 podman-30e731ecc8e439d038bbd2b7ab964a980579acf8.zip |
Revert escaped double dash man page flag syntax
Commit 800a2e2d35 introduced a way to disable the conversion of `--`into
an en dash on docs.podman.io, so the ugly workaround of escaping the
dashes is no longer necessary.
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Diffstat (limited to 'hack')
-rwxr-xr-x | hack/xref-helpmsgs-manpages | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/hack/xref-helpmsgs-manpages b/hack/xref-helpmsgs-manpages index 25e972fbc..cc1e233b9 100755 --- a/hack/xref-helpmsgs-manpages +++ b/hack/xref-helpmsgs-manpages @@ -331,23 +331,12 @@ 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 - while ($line =~ s/^\*\*\\-\\-([a-z0-9-]+)\*\*(=\*[a-zA-Z0-9-]+\*)?(,\s+)?//g) { - # add -- to the flag name - my $flag = "--".$1; - $man{$flag} = 1; - push @most_recent_flags, $flag; + while ($line =~ s/^\*\*(--[a-z0-9-]+)\*\*(=\*[a-zA-Z0-9-]+\*)?(,\s+)?//g) { + $man{$1} = 1; + push @most_recent_flags, $1; } # Short form if ($line =~ s/^\*\*(-[a-zA-Z0-9])\*\*(=\*[a-zA-Z0-9-]+\*)?//g) { |