diff options
Diffstat (limited to 'pandoc-cs1')
-rwxr-xr-x | pandoc-cs1 | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -3,7 +3,7 @@ use warnings; use strict; -use v5.10.1; # use switch keyword "when" (but avoid too complex "given") +use feature qw(switch); no if $] >= 5.018, warnings => "experimental::smartmatch"; use Pandoc::Filter; @@ -21,7 +21,7 @@ pandoc_filter sub { my $self = shift; return unless ($self->name eq 'RawInline' and $self->format eq 'mediawiki'); - for ($self->content) { + given ($self->content) { when (/^{{cite\s+(\w+)\s*\|([^}]*)}}$/) { my $id = 'ref'.++$i; my @data = pairmap { $b =~ s/"/\\"/g; "$a=\"$b\"" } |