|
|
@ -158,6 +158,7 @@ sub _parse_include { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
my $inlines = { |
|
|
|
my $inlines = { |
|
|
|
|
|
|
|
"%%" => "%%", # nowiki |
|
|
|
"__" => "__", # underline |
|
|
|
"__" => "__", # underline |
|
|
|
"//" => "//", # italic |
|
|
|
"//" => "//", # italic |
|
|
|
"**" => "**", # bold |
|
|
|
"**" => "**", # bold |
|
|
@ -172,7 +173,7 @@ sub _parse_text { |
|
|
|
my @parts = (); |
|
|
|
my @parts = (); |
|
|
|
|
|
|
|
|
|
|
|
while ($line) { |
|
|
|
while ($line) { |
|
|
|
$line =~ m!^(?:(.*?)(__|//|''|\*\*|\[\[|\{\{|\(\(|\\\\ ))?(.*)!o; |
|
|
|
$line =~ m!^(?:(.*?)(%%|__|//|''|\*\*|\[\[|\{\{|\(\(|\\\\ ))?(.*)!o; |
|
|
|
my ($before, $match, $after) = ($1, $2, $3); |
|
|
|
my ($before, $match, $after) = ($1, $2, $3); |
|
|
|
if ($before) { |
|
|
|
if ($before) { |
|
|
|
push @parts, $before; |
|
|
|
push @parts, $before; |
|
|
@ -207,6 +208,7 @@ sub _parse_text { |
|
|
|
elsif ($match eq "''") { $tag = 'code'; } |
|
|
|
elsif ($match eq "''") { $tag = 'code'; } |
|
|
|
elsif ($match eq "{{") { push @parts, $self->_parse_include($content); next; } |
|
|
|
elsif ($match eq "{{") { push @parts, $self->_parse_include($content); next; } |
|
|
|
elsif ($match eq "[[") { push @parts, $self->_parse_link($content); next; } |
|
|
|
elsif ($match eq "[[") { push @parts, $self->_parse_link($content); next; } |
|
|
|
|
|
|
|
elsif ($match eq "%%") { push @parts, $content; next; } |
|
|
|
elsif ($match eq "((") { |
|
|
|
elsif ($match eq "((") { |
|
|
|
push @{ $self->{footnotes} }, $self->_parse_text($content); |
|
|
|
push @{ $self->{footnotes} }, $self->_parse_text($content); |
|
|
|
my $n = scalar @{ $self->{footnotes} }; |
|
|
|
my $n = scalar @{ $self->{footnotes} }; |
|
|
|