summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Doc/perl/python.perl27
1 files changed, 14 insertions, 13 deletions
diff --git a/Doc/perl/python.perl b/Doc/perl/python.perl
index 20615cc..4674f90 100644
--- a/Doc/perl/python.perl
+++ b/Doc/perl/python.perl
@@ -344,26 +344,27 @@ sub do_cmd_deprecated{
. $_);
}
-sub do_cmd_versionadded{
- # one parameter: \versionadded{version}
- local($_) = @_;
- my $release = next_argument();
- return ("\n<span class='versionnote'>New in version $release.</span>\n"
- . $_);
-}
-
-sub do_cmd_versionchanged{
- # one parameter: \versionchanged{version}
- local($_) = @_;
+sub versionnote{
+ # one or two parameters: \versionnote[explanation]{version}
+ my $type = @_[0];
+ local $_ = @_[1];
my $explanation = next_optional_argument();
my $release = next_argument();
- my $text = "Changed in version $release.";
+ my $text = "$type in version $release.";
if ($explanation) {
- $text = "Changed in version $release:\n$explanation.";
+ $text = "$type in version $release:\n$explanation.";
}
return "\n<span class='versionnote'>$text</span>\n" . $_;
}
+sub do_cmd_versionadded{
+ return versionnote('New', @_);
+}
+
+sub do_cmd_versionchanged{
+ return versionnote('Changed', @_);
+}
+
#
# These function handle platform dependency tracking.
#