From b8ea4e24bf2c177f7c51861d1a33166f912082c5 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 12 Aug 2012 07:50:04 -0400 Subject: Support macro substitutions. --- (limited to 'scripts/MarkdownBook/Section.pm') diff --git a/scripts/MarkdownBook/Section.pm b/scripts/MarkdownBook/Section.pm index c19a0d0..39b29eb 100644 --- a/scripts/MarkdownBook/Section.pm +++ b/scripts/MarkdownBook/Section.pm @@ -20,7 +20,7 @@ package MarkdownBook::Section; sub new { - my ($class, $doc, $num, $id, $title) = @_; + my ($class, $doc, $lev, $num, $id, $title) = @_; my $self; $class = ref($class) || $class; @@ -28,6 +28,7 @@ sub new bless($self, $class); $self->{'document'} = $doc; + $self->{'level'} = $lev; $self->{'number'} = $num; $self->{'id'} = $id; $self->{'title'} = $title; @@ -35,6 +36,13 @@ sub new return $self; } +sub level +{ + my ($self) = @_; + + return $self->{'level'}; +} + sub number { my ($self, $number) = @_; -- cgit v0.9.1