diff --git a/scripts/docs/update_web_vep_plugins_documentation.pl b/scripts/docs/update_web_vep_plugins_documentation.pl index 0d9b5253e..51660c708 100644 --- a/scripts/docs/update_web_vep_plugins_documentation.pl +++ b/scripts/docs/update_web_vep_plugins_documentation.pl @@ -290,6 +290,11 @@ sub read_plugin_file { my $code_block = 0; my $code_script = 0; + my $ulist = 0; + my $ulist_newline = 0; # prepare to ignore newlines + my $olist = 0; + my $olist_newline = 0; # prepare to ignore newlines + my $table = 0; my $table_newline = 0; # prepare to ignore newlines my $tr_class = ''; @@ -308,6 +313,21 @@ sub read_plugin_file { } else { if ($desc ne '' || $line !~ /^\s+$/) { + if ($line =~ /^\s+[-*+] (.*)/) { + $line = ($ulist ? '' : '' . $line; + $ulist = 0; + } elsif ($line =~ '^\s+$') { + $ulist_newline = 1; + } else { + $line = ' ' . $line; + } + } + if ($line =~ 'key=value') { $line = '' . "\n" . $line if $table; $table = 1; @@ -376,13 +396,28 @@ sub read_plugin_file { $line = "" if $line =~ /^\s+$/; # end code block (terminal commands) - $line = '' . $line; + $line = '

' . $line . '

'; $code_block = 0; } } + if ($line =~ /^\s+\(?([0-9]+)[\)\.] (.*)/) { + $line = ($olist ? '' : '
    ') . '
  1. ' . $2; + $olist = 1; + $olist_newline = 0; + } elsif ($olist) { + if ($olist_newline) { + $line = '
' . $line; + $olist = 0; + } elsif ($line =~ '^\s+$') { + $olist_newline = 1; + } else { + $line = $line; + } + } + $desc .= $line; - $line = '' . $line if $code_block; + $line = '

' . $line . '

' if $code_block; } } chomp($line);