Skip to content

Commit 400cd9c

Browse files
committed
[css2] Updated according to bug fixes for html
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%4071
1 parent f86202b commit 400cd9c

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

css2/bin/Attic/addlinks

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Add links from instances to definitions
33
#
44
# Arnaud Le Hors - lehors@w3.org
5-
# $Id: addlinks,v 1.3 1997-08-12 20:37:23 ian Exp $
5+
# $Id: addlinks,v 1.4 1997-09-17 14:23:36 ian Exp $
66

77
if (($_ = $ARGV[0], /^-r/) && $ARGV[0]) {
88
shift;
@@ -91,7 +91,10 @@ sub readadb {
9191

9292

9393
### main
94+
9495
$wd = "[^ \t\n]+"; # word
96+
$sp = "[ \t\n]*"; # space
97+
$ws = "[ \t\n]+"; # word separator
9598
$etag="</span>";
9699

97100
readfile($input);
@@ -100,8 +103,8 @@ while ($class = $ARGV[0]) {
100103
readadb($ARGV[0]);
101104
shift;
102105
# insert appropriate links
103-
$stag="<span[ \t\n]*class=$class-($wd)>|<span[ \t\n]*class=\"$class-($wd)\">";
104-
$buf =~ s/($stag)(.*?)($etag)/addlink($1, "$2$3", $4, $5, $class)/sgie;
106+
$stag="<span(?:$ws)class=$sp$class-($wd)?>|<span(?:$ws)class=$sp\"$class-($wd)?\">";
107+
$buf =~ s/($stag)$sp(.*?)$sp($etag)/addlink($1, "$2$3", $4, $5, $class)/sgie;
105108
}
106109

107110
# print out result

css2/bin/addlinks

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Add links from instances to definitions
33
#
44
# Arnaud Le Hors - lehors@w3.org
5-
# $Id: addlinks,v 1.3 1997-08-12 20:37:23 ian Exp $
5+
# $Id: addlinks,v 1.4 1997-09-17 14:23:36 ian Exp $
66

77
if (($_ = $ARGV[0], /^-r/) && $ARGV[0]) {
88
shift;
@@ -91,7 +91,10 @@ sub readadb {
9191

9292

9393
### main
94+
9495
$wd = "[^ \t\n]+"; # word
96+
$sp = "[ \t\n]*"; # space
97+
$ws = "[ \t\n]+"; # word separator
9598
$etag="</span>";
9699

97100
readfile($input);
@@ -100,8 +103,8 @@ while ($class = $ARGV[0]) {
100103
readadb($ARGV[0]);
101104
shift;
102105
# insert appropriate links
103-
$stag="<span[ \t\n]*class=$class-($wd)>|<span[ \t\n]*class=\"$class-($wd)\">";
104-
$buf =~ s/($stag)(.*?)($etag)/addlink($1, "$2$3", $4, $5, $class)/sgie;
106+
$stag="<span(?:$ws)class=$sp$class-($wd)?>|<span(?:$ws)class=$sp\"$class-($wd)?\">";
107+
$buf =~ s/($stag)$sp(.*?)$sp($etag)/addlink($1, "$2$3", $4, $5, $class)/sgie;
105108
}
106109

107110
# print out result

0 commit comments

Comments
 (0)