summaryrefslogtreecommitdiffstats
path: root/scripts/MarkdownBook/Section.pm
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/MarkdownBook/Section.pm')
-rw-r--r--scripts/MarkdownBook/Section.pm10
1 files changed, 9 insertions, 1 deletions
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) = @_;