summaryrefslogtreecommitdiff
path: root/pandoc-cs1
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2017-03-29 14:57:50 +0200
committerJonas Smedegaard <dr@jones.dk>2017-03-29 14:57:50 +0200
commit77afc93b17ebab9161ba2bd1389566492abe185d (patch)
treeee9948cc5609952e782040d012d3456bd98f4521 /pandoc-cs1
parent294ad32d0e2cf9b9c2d00913a35b0b84dea17061 (diff)
Fix escape curly quotes in regex (Fatal error since perl 2.24.
Diffstat (limited to 'pandoc-cs1')
-rwxr-xr-xpandoc-cs14
1 files changed, 2 insertions, 2 deletions
diff --git a/pandoc-cs1 b/pandoc-cs1
index 614e2ae..0eafbc3 100755
--- a/pandoc-cs1
+++ b/pandoc-cs1
@@ -26,7 +26,7 @@ pandoc_filter sub {
return unless ($self->name eq 'RawInline' and $self->format eq 'mediawiki');
given ($self->content) {
- when (/^{{cite\s+(\w+)\s*\|([^}]*)}}$/) {
+ when (/^\{\{cite\s+(\w+)\s*\|([^}]*)\}}$/) {
my $id = 'ref'.++$i;
my @data = pairmap { $b =~ s/"/\\"/g; "$a=\"$b\"" }
map { /^\s*(\w+)\s*=\s*"?(.*?)"?\s*$/ }
@@ -61,7 +61,7 @@ pandoc_filter sub {
[ Str $id ],
);
}
- when (/^{{citation needed}}$/) {
+ when (/^\{\{citation needed\}\}$/) {
say STDERR "WARNING: Mediawiki citation needed.";
return [
Str "citation",