]> git.proxmox.com Git - pve-docs.git/commitdiff
scan-adoc-refs: fix title change via attribute
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 14 Oct 2016 05:48:29 +0000 (07:48 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 14 Oct 2016 05:48:29 +0000 (07:48 +0200)
scan-adoc-refs

index b0bc340f4daa18b43c213bac5875b3cd54710bd3..2f24f331d77a1fe7e690f4a517328da7e6878b92 100755 (executable)
@@ -107,11 +107,14 @@ sub register_title {
            die "unable to change title (no doctype)"
                if !defined($fileinfo->{doctype}->{$env}->{$filename});
        }
+    } elsif (!defined($doctype)) {
+       # change title via :title: attribute
+       $fileinfo->{titles}->{$env}->{$filename} = $title;
+    }
 
-       if (defined($doctype) && ($env eq 'manvolnum') && ($doctype == 0)) {
-           if ($title =~ m/.*\(([1-8])\)\s*$/) {
-               $fileinfo->{mansection}->{$env}->{$filename} = $1;
-           }
+    if (defined($doctype) && ($env eq 'manvolnum') && ($doctype == 0)) {
+       if ($title =~ m/.*\(([1-8])\)\s*$/) {
+           $fileinfo->{mansection}->{$env}->{$filename} = $1;
        }
     }