diff options
author | Fred Drake <fdrake@acm.org> | 2000-10-03 06:05:25 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2000-10-03 06:05:25 (GMT) |
commit | 5f84c9b55eef50291b97f7970afa9108e0aef1eb (patch) | |
tree | e7bc019a7693f0ae66985f0474db8c44f9b0a35d /Doc/perl | |
parent | 58a2dff7f4fb4753980781a983be3d5b61abe41d (diff) | |
download | cpython-5f84c9b55eef50291b97f7970afa9108e0aef1eb.zip cpython-5f84c9b55eef50291b97f7970afa9108e0aef1eb.tar.gz cpython-5f84c9b55eef50291b97f7970afa9108e0aef1eb.tar.bz2 |
$OFF_SITE_LINK_ICON: Don't define here; simply defining it overrides a
definition provided by previously loaded configuration code, and
testing whether it's defined isn't needed since the default was
false anyway.
get_link_icon(): Add support for $OFF_SITE_LINK_ICON_HEIGHT and
$OFF_SITE_LINK_ICON_WIDTH, giving the dimensions of the icon
being used. This can make for faster page display. Both are
optional.
make_my_titlegraphic(): Fix insertion of the off-site icon link.
do_env_funcdesc(): Remove debugging print.
handle_rfclike_reference(): Remove trailing colon from first line; it
doesn't really make sense and looks bad if we add an icon to
mark off-site links.
Diffstat (limited to 'Doc/perl')
-rw-r--r-- | Doc/perl/python.perl | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/Doc/perl/python.perl b/Doc/perl/python.perl index 98603c7..476ef66 100644 --- a/Doc/perl/python.perl +++ b/Doc/perl/python.perl @@ -36,15 +36,20 @@ sub make_icon_filename($){ return "$mydir$dd$myname$myext"; } -$OFF_SITE_LINK_ICON = ''; - sub get_link_icon($){ my $url = @_[0]; if ($OFF_SITE_LINK_ICON && ($url =~ /^[-a-zA-Z0-9.]+:/)) { # absolute URL; assume it points off-site my $icon = make_icon_filename($OFF_SITE_LINK_ICON); return (" <img src='$icon'\n" - . " height='12' width='15' border='0' alt='[off-site link]'\n" + . " border='0' class='offsitelink'" + . ($OFF_SITE_LINK_ICON_HEIGHT + ? " height='$OFF_SITE_LINK_ICON_HEIGHT'" + : '') + . ($OFF_SITE_LINK_ICON_WIDTH + ? " width='$OFF_SITE_LINK_ICON_WIDTH'" + : '') + . " alt='[off-site link]'\n" . " >"); } return ''; @@ -769,7 +774,6 @@ sub do_env_funcdesc{ my $arg_list = convert_args(next_argument()); my $idx = make_str_index_entry("<tt class='function'>$function_name()</tt>" . get_indexsubitem()); - print "\n--- funcdesc arg_list:\n$arg_list\n==="; $idx =~ s/ \(.*\)//; $idx =~ s/\(\)<\/tt>/<\/tt>/; return "<dl><dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>" . $_ . '</dl>'; @@ -1293,7 +1297,7 @@ sub make_my_titlegraphic() { if ($TITLE_PAGE_GRAPHIC_WIDTH); $graphic .= " height=\"$TITLE_PAGE_GRAPHIC_HEIGHT\"" if ($TITLE_PAGE_GRAPHIC_HEIGHT); - $graphic .= "\n src=\"$mydir/$myname$myext\"></td>\n"; + $graphic .= "\n src=\"$filename\"></td>\n"; return $graphic; } @@ -1480,7 +1484,7 @@ sub handle_rfclike_reference{ return '<dl compact class="seerfc">' . "\n <dt><a href=\"$url\"" . "\n title=\"$title\"" - . "\n >$what $rfcnum, <em>$title</em>$icon</a>:" + . "\n >$what $rfcnum, <em>$title</em>$icon</a>" . "\n <dd>$text\n </dl>" . $_; } @@ -1498,8 +1502,8 @@ sub do_cmd_seetitle{ my $url = next_optional_argument(); my $title = next_argument(); my $text = next_argument(); - my $icon = get_link_icon($url); if ($url) { + my $icon = get_link_icon($url); return '<dl compact class="seetitle">' . "\n <dt><em class=\"citetitle\"><a href=\"$url\"" . "\n >$title$icon</a></em>" |