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 '')