Revision 84f80318
Von Moritz Bunkus vor fast 9 Jahren hinzugefügt
modules/override/Text/MultiMarkdown.pm | ||
---|---|---|
304 | 304 |
) |
305 | 305 |
```(?:\n|\Z) |
306 | 306 |
}{ |
307 |
my $codeblock = $1; |
|
308 |
my $result; # return value |
|
307 |
my $spaces = ' ' x $self->{tab_width}; |
|
308 |
my $codeblock = $1; |
|
309 |
$codeblock =~ s{^}{$spaces}mg; |
|
309 | 310 |
|
310 |
$codeblock = $self->_EncodeCode($codeblock); |
|
311 |
$codeblock = $self->_Detab($codeblock); |
|
312 |
$codeblock =~ s/\A\n+//; # trim leading newlines |
|
313 |
$codeblock =~ s/\n+\z//; # trim trailing newlines |
|
314 |
|
|
315 |
$result = "\n\n<pre><code>" . $codeblock . "\n</code></pre>\n\n"; |
|
316 |
|
|
317 |
$result; |
|
311 |
$codeblock; |
|
318 | 312 |
}egmsx; |
319 | 313 |
|
320 | 314 |
return $text; |
Auch abrufbar als: Unified diff
MultiMarkdown: Bugfix für ```-Blöcke: deren Inhalt darf nicht interpretiert werden