From 0a0699dc71fc95d02c8079fe45af2b8a261e492e Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Wed, 29 Mar 2017 12:49:28 +0200 Subject: Modernize Pandoc::Element usage: stringify($ast) → $ast->string. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pandoc-memoir | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pandoc-memoir') diff --git a/pandoc-memoir b/pandoc-memoir index 6954877..c15ebe6 100755 --- a/pandoc-memoir +++ b/pandoc-memoir @@ -7,7 +7,7 @@ use feature qw(switch); no if $] >= 5.018, warnings => "experimental::smartmatch"; use Pandoc::Filter 0.06; -use Pandoc::Elements; +use Pandoc::Elements 0.12; my ( $frontmatter_seen, $mainmatter_seen, $backmatter_seen, $toc_seen); @@ -23,7 +23,7 @@ sub matter { my (@replace, @prepend); # push @prepend, RawBlock( 'latex', '\\frontmatter' ) # unless ($toc_seen++); - given (stringify($self)) { + given ($self->string) { when ( /^Table/ and not $frontmatter_seen++ ) { push @replace, RawBlock( 'latex', '{\\hypersetup{linkcolor=black}\\setcounter{tocdepth}{3}\\cleartorecto\\tableofcontents}' @@ -48,6 +48,6 @@ sub matter { sub toc { my $self = shift; return [] - if ( $self->name eq 'Para' and stringify($self) =~ /__TOC__/ ); + if ( $self->name eq 'Para' and $self->string =~ /__TOC__/ ); return; } -- cgit v1.2.3