summaryrefslogtreecommitdiffstats
path: root/Doc/perl
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1999-11-09 16:59:42 (GMT)
committerFred Drake <fdrake@acm.org>1999-11-09 16:59:42 (GMT)
commitc9f5fe0d1c692c0f720a951db863d7665b331eab (patch)
tree9b1c799c44ed9943481cccc9902c521c2d4bff61 /Doc/perl
parent768d2271a8e15566c8421dabe845446a9221f031 (diff)
downloadcpython-c9f5fe0d1c692c0f720a951db863d7665b331eab.zip
cpython-c9f5fe0d1c692c0f720a951db863d7665b331eab.tar.gz
cpython-c9f5fe0d1c692c0f720a951db863d7665b331eab.tar.bz2
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.
Diffstat (limited to 'Doc/perl')
-rw-r--r--Doc/perl/python.perl19
1 files changed, 19 insertions, 0 deletions
diff --git a/Doc/perl/python.perl b/Doc/perl/python.perl
index 718734e..57a19ed 100644
--- a/Doc/perl/python.perl
+++ b/Doc/perl/python.perl
@@ -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($_) = @_;