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 b0bc340..2f24f33 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;
        }
     }