summaryrefslogtreecommitdiff
path: root/pandoc-memoir
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2014-12-26 07:26:01 +0100
committerJonas Smedegaard <dr@jones.dk>2014-12-26 07:26:01 +0100
commitfd328914b7239df85d23aba415932a25e28bc024 (patch)
tree039e73d75de2aa31f0f083ba1b6d7429d3980ad9 /pandoc-memoir
parent1ef17724343133873010e34cd395f980d324bf8f (diff)
Strip __TOC__ hint.
Diffstat (limited to 'pandoc-memoir')
-rwxr-xr-xpandoc-memoir9
1 files changed, 6 insertions, 3 deletions
diff --git a/pandoc-memoir b/pandoc-memoir
index cce7c9d..174337c 100755
--- a/pandoc-memoir
+++ b/pandoc-memoir
@@ -47,9 +47,12 @@ sub backmatter {
sub toc {
my $self = shift;
- return unless ( $self->name eq 'Header' and $self->level == 1
- and stringify($self) =~ /^Table/ );
return RawBlock( 'latex',
'{\\hypersetup{linkcolor=black}\\setcounter{tocdepth}{3}\\clearpage\\tableofcontents}'
- );
+ )
+ if ( $self->name eq 'Header' and $self->level == 1
+ and stringify($self) =~ /^Table/ );
+ return []
+ if ( $self->name eq 'Para' and stringify($self) =~ /__TOC__/ );
+ return;
}