From: Dietmar Maurer Date: Fri, 14 Oct 2016 05:48:29 +0000 (+0200) Subject: scan-adoc-refs: fix title change via attribute X-Git-Url: https://git.proxmox.com/?p=pve-docs.git;a=commitdiff_plain;h=66e541d00400769a6b5aa237669968411e8a6d1b;hp=44c96cef7afda2b1a01e0feb3446ca5e86640e80 scan-adoc-refs: fix title change via attribute --- diff --git a/scan-adoc-refs b/scan-adoc-refs index b0bc340..2f24f33 100755 --- a/scan-adoc-refs +++ b/scan-adoc-refs @@ -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; } }