Browse Source

* '%%' inline handler

master
Zubrikhin Alexey 10 years ago
parent
commit
509cf2a25e
  1. 4
      lib/Text/Dokuwiki/Parser.pm

4
lib/Text/Dokuwiki/Parser.pm

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

Loading…
Cancel
Save