Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
86333606
Commit
86333606
authored
Apr 10, 2001
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add corresponding support for the alltt environment to the HTML generator.
parent
b5309a95
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
2 deletions
+48
-2
Doc/perl/howto.perl
Doc/perl/howto.perl
+1
-1
Doc/perl/manual.perl
Doc/perl/manual.perl
+1
-1
Doc/perl/python.perl
Doc/perl/python.perl
+46
-0
No files found.
Doc/perl/howto.perl
View file @
86333606
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
package
main
;
package
main
;
do_require_package
("
article
");
do_require_package
("
article
");
#do_require_package("verbatim
");
do_require_package
("
alltt
");
do_require_package
("
python
");
do_require_package
("
python
");
1
;
# sheesh....
1
;
# sheesh....
Doc/perl/manual.perl
View file @
86333606
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
package
main
;
package
main
;
do_require_package
("
report
");
do_require_package
("
report
");
#do_require_package("verbatim
");
do_require_package
("
alltt
");
do_require_package
("
python
");
do_require_package
("
python
");
1
;
# sheesh....
1
;
# sheesh....
Doc/perl/python.perl
View file @
86333606
...
@@ -1593,4 +1593,50 @@ withsubitem # {} # {}
...
@@ -1593,4 +1593,50 @@ withsubitem # {} # {}
_RAW_ARG_DEFERRED_CMDS_
_RAW_ARG_DEFERRED_CMDS_
$alltt_start
=
'
<dl><dd><pre class="verbatim">
';
$alltt_end
=
'
</pre></dl>
';
sub
do_env_alltt
{
local
(
$_
)
=
@_
;
local
(
$closures
,
$reopens
,
@open_block_tags
);
# get the tag-strings for all open tags
local
(
@keep_open_tags
)
=
@$open_tags_R
;
(
$closures
,
$reopens
)
=
&
preserve_open_tags
()
if
(
@$open_tags_R
);
# get the tags for text-level tags only
$open_tags_R
=
[
@keep_open_tags
];
local
(
$local_closures
,
$local_reopens
);
(
$local_closures
,
$local_reopens
,
@open_block_tags
)
=
&
preserve_open_block_tags
if
(
@$open_tags_R
);
$open_tags_R
=
[
@open_block_tags
];
do
{
local
(
$open_tags_R
)
=
[
@open_block_tags
];
local
(
@save_open_tags
)
=
();
local
(
$cnt
)
=
++
$global
{'
max_id
'};
$_
=
join
('',"
$O$cnt$C
\\
tt
$O
",
++
$global
{'
max_id
'},
$C
,
$_
,
$O
,
$global
{'
max_id
'},
"
$C$O$cnt$C
");
$_
=
&
translate_environments
(
$_
);
$_
=
&
translate_commands
(
$_
)
if
(
/\\/
);
# preserve space-runs, using
while
(
s/(\S) ( +)/$1$2;SPMnbsp;/g
){};
s/(<BR>) /$1;SPMnbsp;/g
;
$_
=
join
('',
$closures
,
$alltt_start
,
$local_reopens
,
$_
,
&
balance_tags
()
#, $local_closures
,
$alltt_end
,
$reopens
);
undef
$open_tags_R
;
undef
@save_open_tags
;
};
$open_tags_R
=
[
@keep_open_tags
];
$_
;
}
1
;
# This must be the last line
1
;
# This must be the last line
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment