Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit af07b2c

Browse files
committed
Add yet more markup that let's a stylesheet pick out a small bit of the
presentation. This is acceptable since it only occurs in the formatted output and does not affect the document markup.
1 parent 7f10cce commit af07b2c

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

Doc/perl/python.perl

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,10 @@ sub get_refcount{
868868
return $REFCOUNTS{"$func:$param"};
869869
}
870870

871+
872+
$TLSTART = '<span class="typelabel">';
873+
$TLEND = '</span>';
874+
871875
sub do_env_cfuncdesc{
872876
local($_) = @_;
873877
my $return_type = next_argument();
@@ -1047,7 +1051,10 @@ sub do_env_excdesc{
10471051
local($_) = @_;
10481052
my $excname = next_argument();
10491053
my $idx = make_str_index_entry("<tt class=\"exception\">$excname</tt>");
1050-
return "<dl><dt><b>exception $idx</b>\n<dd>" . $_ . '</dl>'
1054+
return ("<dl><dt><b>${TLSTART}exception$TLEND $idx</b>"
1055+
. "\n<dd>"
1056+
. $_
1057+
. '</dl>');
10511058
}
10521059

10531060
sub do_env_fulllineitems{ return do_env_itemize(@_); }
@@ -1060,7 +1067,8 @@ sub handle_classlike_descriptor{
10601067
$idx = make_str_index_entry(
10611068
"<tt class=\"$what\">$THIS_CLASS</tt> ($what in $THIS_MODULE)" );
10621069
$idx =~ s/ \(.*\)//;
1063-
return ("<dl><dt><b>$what $idx</b>(<var>$arg_list</var>)\n<dd>"
1070+
return ("<dl><dt><b>$TLSTART$what$TLEND $idx</b>"
1071+
. "(<var>$arg_list</var>)\n<dd>"
10641072
. $_
10651073
. '</dl>');
10661074
}
@@ -1075,7 +1083,7 @@ sub do_env_classdescstar{
10751083
$idx = make_str_index_entry(
10761084
"<tt class=\"class\">$THIS_CLASS</tt> (class in $THIS_MODULE)");
10771085
$idx =~ s/ \(.*\)//;
1078-
return ("<dl><dt><b>class $idx</b>\n<dd>"
1086+
return ("<dl><dt><b>${TLSTART}class$TLEND $idx</b>\n<dd>"
10791087
. $_
10801088
. '</dl>');
10811089
}

0 commit comments

Comments
 (0)