summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2017-03-31 22:19:37 +0200
committerJonas Smedegaard <dr@jones.dk>2017-03-31 22:19:37 +0200
commit5db61f2ea1725e87df08a5d5ec2d83aec4a8b8fe (patch)
treeba1df0a327878a5fb71c8944704f89684d06d639
parenta2c5133814f19daac85c48e986a34de3fb7cdb29 (diff)
Fix relax regex to permit curly quotes within cite (e.g. to protect capitalization).
-rwxr-xr-xpandoc-cs12
1 files changed, 1 insertions, 1 deletions
diff --git a/pandoc-cs1 b/pandoc-cs1
index 197d882..2cfc81a 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*$/ }