summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler/Misc.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-11-13 14:08:20 +0100
committerYorhel <git@yorhel.nl>2009-11-13 14:08:20 +0100
commit997d1752ff1b1d2b1cf425b2c05dc180abc2243a (patch)
treedd8569564720bda4526a1fcae5f8c0c6591c087d /lib/VNDB/Handler/Misc.pm
parent8053d00b0c9efa9bf1a7b176dcb8d9c106c1ee0d (diff)
docs: Updated d11 and added :SUBSUB: macro
Diffstat (limited to 'lib/VNDB/Handler/Misc.pm')
-rw-r--r--lib/VNDB/Handler/Misc.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/VNDB/Handler/Misc.pm b/lib/VNDB/Handler/Misc.pm
index 9625372b..d2f5852b 100644
--- a/lib/VNDB/Handler/Misc.pm
+++ b/lib/VNDB/Handler/Misc.pm
@@ -281,12 +281,17 @@ sub docpage {
(my $title = shift @c) =~ s/^:TITLE://;
chomp $title;
- my $sec = 0;
+ my($sec, $subsec) = (0,0);
for (@c) {
s{^:SUB:(.+)\r?\n$}{
$sec++;
+ $subsec = 0;
qq|<h3><a href="#$sec" name="$sec">$sec. $1</a></h3>\n|
}eg;
+ s{^:SUBSUB:(.+)\r?\n$}{
+ $subsec++;
+ qq|<h4><a href="#$sec.$subsec" name="$sec.$subsec">$sec.$subsec. $1</a></h4>\n|
+ }eg;
s{^:INC:(.+)\r?\n$}{
$f = sprintf('%s/data/docs/%s', $VNDB::ROOT, $1);
open($F, '<:utf8', $f.$l) or open($F, '<:utf8', $f) or die $!;