From: Kevin McCarthy Date: Mon, 29 Jul 2019 02:23:12 +0000 (-0700) Subject: Improve gen-map-doc work on multi-word maps. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=71e881a6d070a2d12ce688e256e953c9482819e8;p=mutt Improve gen-map-doc work on multi-word maps. --- diff --git a/doc/gen-map-doc b/doc/gen-map-doc index e2fadaca..775ce470 100644 --- a/doc/gen-map-doc +++ b/doc/gen-map-doc @@ -49,21 +49,21 @@ open XML, $xml or die "$xml: $!"; while () { if (/__print_map\((.*)\)/) { my $map = $1; + my $mapid = $1; my $maptitle = $1; - $maptitle =~ s/^(.)/\U$1\E/; + $mapid =~ s/\s+/-/g; + $maptitle =~ s/\b(\w)/\u$1/g; unless ($MAP{$map}) { warn "map $map undefined"; next; } - my $title = $map; - $title =~ s/(.)(.+)/\U$1\E$2/; print < + $maptitle Menu $DOC{$map} - -Default $title Menu Bindings +
+Default $maptitle Menu Bindings FunctionDefault keyDescription