[Python-checkins] CVS: python/dist/src/Doc/tools node2label.pl,1.9.4.1,1.9.4.2

Fred L. Drake fdrake@weyr.cnri.reston.va.us
Wed, 1 Mar 2000 17:35:15 -0500 (EST)


Update of /projects/cvsroot/python/dist/src/Doc/tools
In directory weyr:/home/fdrake/projects/python/Doc-152p2/tools
Modified Files:
 Tag: release152p1-patches
	node2label.pl 
Log Message:
Ugh.
Fixed an even more subtle bug here; this should fix the index problems 
caused by partial translation of links to the "logical" file names.
This script did not support the use of both single- and double-quotes, 
but the generated HTML used both. (It used to only use
double-quotes.)
Index: node2label.pl
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Doc/tools/node2label.pl,v
retrieving revision 1.9.4.1
retrieving revision 1.9.4.2
diff -C2 -r1.9.4.1 -r1.9.4.2
*** node2label.pl	2000年03月01日 20:26:58	1.9.4.1
--- node2label.pl	2000年03月01日 22:35:12	1.9.4.2
***************
*** 33,46 ****
 # don't want to do one s/// per line per node
 # so look for lines with hrefs, then do s/// on nodes present
! if (/(HREF|href)=\"([^\#\"]*)html[\#\"]/) {
! @parts = split(/(HREF|href)\=\"/);
 shift @parts;
 for $node (@parts) {
! $node =~ s/[\#\"].*$//g;
 chop($node);
 if (defined($nodes{$node})) {
 	$label = $nodes{$node};
! 	if (s/(HREF|href)=\"$node([\#\"])/1ドル=\"$label.html2ドル/g) {
! 	 s/(HREF|href)=\"$label.html/href=\"$label.html/g;
 	 $newnames{$node} = "$label.html";
 	}
--- 33,46 ----
 # don't want to do one s/// per line per node
 # so look for lines with hrefs, then do s/// on nodes present
! if (/(HREF|href)=[\"\']([^\#\"\']*)html[\#\"\']/) {
! @parts = split(/(HREF|href)\=[\"\']/);
 shift @parts;
 for $node (@parts) {
! $node =~ s/[\#\"\'].*$//g;
 chop($node);
 if (defined($nodes{$node})) {
 	$label = $nodes{$node};
! 	if (s/(HREF|href)=([\"\'])$node([\#\"\'])/href=2ドル$label.html3ドル/g) {
! 	 s/(HREF|href)=([\"\'])$label.html/href=2ドル$label.html/g;
 	 $newnames{$node} = "$label.html";
 	}

AltStyle によって変換されたページ (->オリジナル) /