diff options
author | P. J. McDermott <pjm@nac.net> | 2012-08-12 07:50:04 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2012-08-12 07:50:04 (EDT) |
commit | b8ea4e24bf2c177f7c51861d1a33166f912082c5 (patch) | |
tree | 483845610c686a6c1a2ef8119855aa4921242085 /scripts/MarkdownBook/Section.pm | |
parent | eda7d670f3545bbf0a5704a19920417c71d25e60 (diff) |
Support macro substitutions.
Diffstat (limited to 'scripts/MarkdownBook/Section.pm')
-rw-r--r-- | scripts/MarkdownBook/Section.pm | 10 |
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) = @_; |