mirror of
git://git.proxmox.com/git/pve-docs.git
synced 2025-03-19 18:50:06 +03:00
scan-adoc-refs: allow to overwrite title using attribute
This commit is contained in:
parent
152b10fb37
commit
edc73653fb
@ -97,7 +97,13 @@ sub register_title {
|
||||
$title =~ s!http://\S+\[(.*?)\]!$1!g;
|
||||
|
||||
$fileinfo->{titles}->{$env}->{$filename} = $title;
|
||||
$fileinfo->{doctype}->{$env}->{$filename} = $doctype;
|
||||
|
||||
if (defined($doctype)) {
|
||||
$fileinfo->{doctype}->{$env}->{$filename} = $doctype;
|
||||
} else {
|
||||
die "unable to change title (no doctype)"
|
||||
if !defined($fileinfo->{doctype}->{$env}->{$filename});
|
||||
}
|
||||
}
|
||||
|
||||
sub scan_adoc_file {
|
||||
@ -157,6 +163,10 @@ sub scan_adoc_file {
|
||||
if !defined($title);
|
||||
$fileinfo->{toplevel}->{$e}->{$filename} = 1;
|
||||
}
|
||||
} elsif ($key eq 'title') {
|
||||
foreach my $e (@{$env_stack->[-1]}) {
|
||||
register_title($filename, $e, undef, $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user