Added parsing of Status header and &
This commit is contained in:
parent
1e25ae3db8
commit
8f29543c11
1 changed files with 9 additions and 0 deletions
9
doc/mkdr
9
doc/mkdr
|
@ -19,6 +19,7 @@ while(<>){
|
|||
}
|
||||
|
||||
$secend="";
|
||||
$status="unknown";
|
||||
|
||||
while($s = shift @lines){
|
||||
@x = $s;
|
||||
|
@ -42,6 +43,8 @@ while($s = shift @lines){
|
|||
$devices = $1;
|
||||
}elsif($x =~ m/^Author: (.*)/){
|
||||
$author = $1
|
||||
}elsif($x =~ m/^Status: (.*)/){
|
||||
$status = $1
|
||||
}
|
||||
}else{
|
||||
if($s eq "\n"){
|
||||
|
@ -52,9 +55,11 @@ while($s = shift @lines){
|
|||
$comment = $comment . $s;
|
||||
}
|
||||
if($blank==3){
|
||||
$comment =~ s/&/&/g;
|
||||
$comment =~ s/@/@/g;
|
||||
$comment =~ s/</</g;
|
||||
$comment =~ s/>/>/g;
|
||||
$author =~ s/&/&/g;
|
||||
$author =~ s/@/@/g;
|
||||
$author =~ s/</</g;
|
||||
$author =~ s/>/>/g;
|
||||
|
@ -67,6 +72,9 @@ $driver -- $description
|
|||
<para>
|
||||
Author: $author
|
||||
</para>
|
||||
<para>
|
||||
Status: $status
|
||||
</para>
|
||||
";
|
||||
if($devices ne ""){
|
||||
print
|
||||
|
@ -138,6 +146,7 @@ $comment
|
|||
$blank=0;
|
||||
|
||||
$comment="";
|
||||
$status="unknown";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue