Skip to content

Commit c3f8abc

Browse files
zcorpansideshowbarker
authored andcommitted
Allow parentheses in the attribute index, for <source>'s attributes
See whatwg/html#6419
1 parent ec75dde commit c3f8abc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.pre-process-annotate-attributes.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@
5151
# ignore...
5252
}
5353
} elsif ($mode eq 'tr') {
54-
if ($_ =~ m!^ <td> <(?:code|span) data-x="([^"]+)">[^<]*</(?:code|span)>;?\n$!os) {
54+
if ($_ =~ m!^ <td> <(?:code|span) data-x="([^"]+)">[^<]*</(?:code|span)>(?: \(in [^\)]+\))?;?\n$!os) {
5555
$attributes{$1} = 1;
5656
$mode = 'index-in';
5757
} else {
5858
# ignore...
5959
}
6060
} elsif ($mode eq 'index-in') {
61-
if ($_ =~ m!^ <(?:code|span) data-x="([^"]+)">[^<]*</(?:code|span)>;?\n$!os) {
61+
if ($_ =~ m!^ <(?:code|span) data-x="([^"]+)">[^<]*</(?:code|span)>(?: \(in [^\)]+\))?;?\n$!os) {
6262
$attributes{$1} = 1;
6363
} elsif ($_ =~ m@^ <td> (.+?)(?:<!--or: (.+)-->)?\n$@os) {
6464
local $" = ', ';

0 commit comments

Comments
 (0)