From c55c2a1b5697f70b25c201077c50b4f682e569fe Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Sat, 9 May 2015 20:07:09 +1000 Subject: [PATCH] = Text::Dokuwiki::Parser->_parse_include --- lib/Text/Dokuwiki/Parser.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Text/Dokuwiki/Parser.pm b/lib/Text/Dokuwiki/Parser.pm index e2fa3a0..c91c794 100644 --- a/lib/Text/Dokuwiki/Parser.pm +++ b/lib/Text/Dokuwiki/Parser.pm @@ -119,18 +119,18 @@ sub _parse_link { sub _parse_include { my ($self, $content) = @_; - if ($content =~ m|{{([a-z]+)>(.*)}}|oi) { + if ($content =~ m|^([a-z]+)>(.*)|oi) { ... } my ($lpad, $rpad, $src, %attrs) = ('', '', ''); - if ($content =~ m!^{{(\s*)([^\s\|]+)(\s*)\|(.*)}}!oi) { + if ($content =~ m!^(\s*)([^\s\|]+)(\s*)[|](.*)!oi) { ($lpad, $src, $rpad) = ($1, $2, $3); $attrs{title} = $4; - } elsif ($content =~ m!^{{(\s*)(\S+)(\s*)}}!) { + } elsif ($content =~ m!^(\s*)(\S+)(\s*)!) { ($lpad, $src, $rpad) = ($1, $2, $3); } else { - ($src) = ($content =~ s/{{(.+)}}/$1/or); + ($src) = ($content =~ s/^(.+)/$1/or); } $attrs{align} = ($lpad ne '')