From 66e541d00400769a6b5aa237669968411e8a6d1b Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Fri, 14 Oct 2016 07:48:29 +0200 Subject: [PATCH] scan-adoc-refs: fix title change via attribute --- scan-adoc-refs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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; } } -- 2.39.2