do_cmd_programopt(): New function, similar to do_cmd_program().

do_cmd_citetitle():  New function.  Extracts one optional and one
                     required parameter.  If the optional one is
                     provided, it is used a URL (or relative URL) and
                     the text of the required parameter is turned into
                     a hyperlink.
This commit is contained in:
Fred Drake 1999-11-09 16:59:42 +00:00
parent 768d2271a8
commit c9f5fe0d1c
1 changed files with 19 additions and 0 deletions

View File

@ -148,6 +148,8 @@ sub do_cmd_character{
return use_wrappers(@_[0], '"<tt class=character>', '</tt>"'); }
sub do_cmd_program{
return use_wrappers(@_[0], '<b class=program>', '</b>'); }
sub do_cmd_programopt{
return use_wrappers(@_[0], '<b class="programopt">', '</b>'); }
sub do_cmd_email{
return use_wrappers(@_[0], '<span class=email>', '</span>'); }
sub do_cmd_mimetype{
@ -233,6 +235,23 @@ sub do_cmd_rfc{
. $_);
}
sub do_cmd_citetitle{
local($_) = @_;
my $url = next_optional_argument();
my $title = next_argument();
my $repl = '';
if ($url) {
$repl = ("<em class='citetitle'><a\n"
. " href='$url'\n"
. " title='$title'\n"
. " >$title</a></em>");
}
else {
$repl = "<em class='citetitle'\n >$title</em>";
}
return $repl . $_;
}
sub do_cmd_deprecated{
# two parameters: \deprecated{version}{whattodo}
local($_) = @_;