File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 175175 } else {
176176 undef $lang ;
177177 }
178- if ($v =~ /^ {0,3}\S /m) { $v =~ s/^/ /gm }
178+ if ($v =~ /^ {0,3}\S /ms) {
179+ $v =~ s/^/ /gms;
180+ }
179181 my $out = "\n $v ";
180182 if ($lang ) {
181183 $out = "```$lang \n $out ```";
229231
230232while ($s =~ s { ^(\S [^\n ]*?)?([^\(\<\n ])(https?://[^\s )(\n ]+)} { $1$2 <$3 >} gms ) {}
231233# $s =~ s{^\[\[(\w+)\]\]}{my $name = $1; my $link = gen_link($name); warn "!!! $name"; defined($link) ? "[$name]($link)" : "[$name](http://wiki.nginx.org/$name)"}gsme;
232- while ($s =~ s { ^(\S [^\n ]*?)\[\[ (\w +)\]\] } {
234+ while ($s =~ s { ^(\S [^\n ]*?)? \[\[ (\w +|".*?" )\]\] } {
233235 my ($prefix , $name ) = ($1 , $2 );
234236 my ($link , $modname ) = gen_link($name );
235237 if (!defined $link ) {
278280
279281$s =~ s { ^```(\w +)\n (.*?)^```\n } {
280282 my ($lang , $out ) = ($1 , $2 );
281- $out =~ s/^ //gm;
283+ $out =~ s/^ / /gms;
284+ $out =~ s/ +$/ /gms;
282285 "```$lang \n " . $out . "```\n "
283286} gesm ;
284287
294297 $toc
295298} egms ;
296299
300+ while ($s =~ s { ^(\S [^\n ]*?)\[ (\w +)\] (?![\( `])} { $1 \\ [$2 \\ ]} gms ) {}
301+
297302print " <!---\n Don't edit this file manually! Instead you should generate it " ,
298303 " by using:\n wiki2markdown.pl $infile \n -->\n\n " ;
299304print $s ;
You can’t perform that action at this time.
0 commit comments