Debian Codegraph @

doc/sources/admin/fixresult.pl

raw
1
2 sub indent {
3 my $tag = shift || " important";
4 $tag = " note" if $tag eq " info";
5 my $text = shift;
6 $text =~ s/^ *//;
7 # $text =~ s/\n(?!(\n|\.|-|$))/ /sg;
8 $text =~ s/^/ /mg;
9 return "\n..${tag}:: \n\n".$text;
10 }
11
12 my $var;
13 {
14 local $/;
15 $var = <STDIN>;
16 }
17
18 # Handle admonitions
19 $var =~ s/<note([^>]*)>(.*?)<\/note>/indent($1,$2)/ges;
20
21 # Make image urls absolute
22 #$var =~ s/image:: \//image:: /g;
23
24 # Handle new.png
25 $var =~ s/image:: \.\.\/new/image:: \/documentation\/new/g;
26
27 # Remove ::: syntax
28 $var =~ s/::://g;
29 print $var