summaryrefslogtreecommitdiffstats
path: root/Doc/myformat.perl
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1998-02-13 15:08:36 (GMT)
committerFred Drake <fdrake@acm.org>1998-02-13 15:08:36 (GMT)
commit2549249f79347bece00621059e05b3a8c3f0dec8 (patch)
treee0c6515fd56c0b18f5fada3c8aef383cc4a1cda5 /Doc/myformat.perl
parentfb74a463ad4a4d3ed10db01c63bd8512927e5bee (diff)
downloadcpython-2549249f79347bece00621059e05b3a8c3f0dec8.zip
cpython-2549249f79347bece00621059e05b3a8c3f0dec8.tar.gz
cpython-2549249f79347bece00621059e05b3a8c3f0dec8.tar.bz2
&do_env_datadescni,
&do_env_funcdescni: New functions. These support the non-indexing variety of the {datadesc} and {funcdesc} environments. There's still some flakiness with the new indexsubitem support, but that's low priority.
Diffstat (limited to 'Doc/myformat.perl')
-rw-r--r--Doc/myformat.perl31
1 files changed, 29 insertions, 2 deletions
diff --git a/Doc/myformat.perl b/Doc/myformat.perl
index aba1ab1..7f3a843 100644
--- a/Doc/myformat.perl
+++ b/Doc/myformat.perl
@@ -205,7 +205,7 @@ sub my_parword_index_helper{
#
$STRIP_INDEX_TT = 0;
-sub make_mod_index_entry {
+sub make_mod_index_entry{
local($br_id,$str,$define) = @_;
local($halfref) = &make_half_href("$CURRENT_FILE#$br_id");
# If TITLE is not yet available (i.e the \index command is in the title
@@ -266,7 +266,7 @@ sub get_indexsubitem{
# similar to make_index_entry(), but includes the string in the result
# instead of the dummy filler.
#
-sub make_str_index_entry {
+sub make_str_index_entry{
local($br_id,$str) = @_;
# If TITLE is not yet available (i.e the \index command is in the title
# of the current section), use $ref_before.
@@ -339,6 +339,21 @@ sub do_env_funcdesc{
"<dl><dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>$'\n</dl>";
}
+sub do_env_funcdescni{
+ local($_) = @_;
+ local($function_name,$arg_list,$idx) = ('', '', '');
+ local($funcdesc_rx) = "$next_pair_rx$any_next_pair_rx3";
+ if (/$funcdesc_rx/o) {
+ $function_name = "$2";
+ $arg_list = "$4";
+ if ($STRIP_INDEX_TT) {
+ $idx = $function_name; }
+ else {
+ $idx = "<tt>$function_name</tt>"; }
+ }
+ "<dl><dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>$'\n</dl>";
+}
+
sub do_cmd_funcline{
local($_) = @_;
local($funcdesc_rx) = "$next_pair_pr_rx$OP(\\d+)$CP([\\s\\S]*)$OP\\3$CP";
@@ -389,6 +404,18 @@ sub do_env_datadesc{
"<dl><dt><b>$idx</b>\n<dd>$'\n</dl>"
}
+sub do_env_datadescni{
+ local($_) = @_;
+ local($idx) = '';
+ if (/$next_pair_rx/o) {
+ if ($STRING_INDEX_TT) {
+ $idx = "$2"; }
+ else {
+ $idx = "<tt>$2</tt>"; }
+ }
+ "<dl><dt><b>$idx</b>\n<dd>$'\n</dl>"
+}
+
sub do_cmd_dataline{
local($_) = @_;