]> git.proxmox.com Git - pve-docs.git/blobdiff - scan-adoc-refs
scan-adoc-refs: fix title change via attribute
[pve-docs.git] / 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;
        }
     }