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

Skip to content

Commit dbb2b9d

Browse files
committed
Hackish way to generate an up-<link> for the title page if we have
one. Added misc. comments.
1 parent 4a47349 commit dbb2b9d

1 file changed

Lines changed: 16 additions & 4 deletions

File tree

Doc/perl/python.perl

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -724,9 +724,9 @@ ($)
724724
}
725725

726726

727-
%TokenToTargetMapping = ();
728-
%DefinedGrammars = ();
729-
%BackpatchGrammarFiles = ();
727+
%TokenToTargetMapping = (); # language:token -> link target
728+
%DefinedGrammars = (); # language -> full grammar text
729+
%BackpatchGrammarFiles = (); # file -> 1 (hash of files to fixup)
730730

731731
sub do_cmd_token{
732732
local($_) = @_;
@@ -1647,7 +1647,18 @@ ()
16471647

16481648
sub do_cmd_maketitle{
16491649
local($_) = @_;
1650-
my $the_title = "\n<div class=\"titlepage\">";
1650+
my $the_title = "\n";
1651+
if ($EXTERNAL_UP_LINK) {
1652+
# This generates a <LINK> element in the wrong place (the
1653+
# body), but I don't see any other way to get this generated
1654+
# at all. Browsers like Mozilla, that support navigation
1655+
# links, can make use of this.
1656+
$the_title .= ("<link rel='up' href='$EXTERNAL_UP_LINK'"
1657+
. ($EXTERNAL_UP_TITLE
1658+
? " title='$EXTERNAL_UP_TITLE'" : '')
1659+
. ">\n");
1660+
}
1661+
$the_title .= '<div class="titlepage">';
16511662
if ($TITLE_PAGE_GRAPHIC) {
16521663
if ($TITLE_PAGE_GRAPHIC_ON_RIGHT) {
16531664
$the_title .= ("\n<table border=\"0\" width=\"100%\">"
@@ -1854,6 +1865,7 @@ sub do_cmd_seepep{
18541865
}
18551866

18561867
sub do_cmd_seerfc{
1868+
# XXX Would be nice to add links to the text/plain and PDF versions.
18571869
return handle_rfclike_reference(@_[0], "RFC", $RFC_FORMAT);
18581870
}
18591871

0 commit comments

Comments
 (0)