|
6 | 6 | my %definitions;
|
7 | 7 | my $inpre = 0;
|
8 | 8 | while (<>) {
|
9 |
| - $inpre = 1 if /<pre class=idl>/os; |
10 |
| - if ($inpre && /(partial )?interface <(span|dfn|a href=#[^ >]*) id=([^ >]*).*?>([^<:]*)?<\/(span|dfn|a)>(.*<!-- not obsolete -->)?/os) { |
11 |
| - my ($partial, $id, $name, $notobs) = ($1, $3, $4, $6); |
12 |
| - $notobs = $name eq 'NavigatorID'; # XXX hack for now |
| 9 | + $inpre = 1 if /<pre><code class='idl'>/os; |
| 10 | + if ($inpre && /(<c- b>partial<\/c-> )?<c- b>interface<\/c-> <(?:span|dfn|a href='#[^ >]*')(?: data-lt[^ ]*)? id='([^ >]*)'.*?><c- g>([^<:]*)?<\/c-><\/(span|dfn|a)>/os) { |
| 11 | + my ($partial, $id, $name) = ($1, $2, $3); |
| 12 | + my $notobs = 0; # XXX we can use this to avoid implying a partial interface is obsolete. Unused at the moment. |
13 | 13 | $definitions{$name} = { } unless defined $definitions{$name};
|
14 | 14 | if ($partial) {
|
15 | 15 | $definitions{$name}{partial} = [] unless exists $definitions{$name}{partial};
|
|
19 | 19 | $definitions{$name}{primary} = $id;
|
20 | 20 | }
|
21 | 21 | }
|
22 |
| - $inpre = 0 if /<\/pre>/os; |
| 22 | + $inpre = 0 if /<\/code><\/pre>/os; |
23 | 23 | push(@lines, $_);
|
24 | 24 | }
|
25 | 25 |
|
26 | 26 | die if $inpre;
|
27 | 27 |
|
28 | 28 | my $current = '';
|
29 | 29 | foreach (@lines) {
|
30 |
| - $inpre = 1 if /<pre class=idl>/os; |
| 30 | + $inpre = 1 if /<pre><code class='idl'>/os; |
31 | 31 | if ($inpre) {
|
32 |
| - if (/(partial )?interface <(span|dfn|a href=#[^ >]*) id=([^ >]*).*?>([^<:]*)?<\/(span|dfn|a)>/os) { |
33 |
| - my ($partial, $id, $name) = ($1, $3, $4); |
| 32 | + if (/(<c- b>partial<\/c-> )?<c- b>interface<\/c-> <(?:span|dfn|a href='#[^ >]*')(?: data-lt[^ ]*)? id='([^ >]*)'.*?><c- g>([^<:]*)?<\/c-><\/(span|dfn|a)>/os) { |
| 33 | + my ($partial, $id, $name) = ($1, $2, $3); |
34 | 34 | die if $current;
|
35 | 35 | $current = $name unless $partial;
|
36 | 36 | }
|
|
47 | 47 | $current = '';
|
48 | 48 | }
|
49 | 49 | }
|
50 |
| - $inpre = 0 if /<\/pre>/os; |
| 50 | + $inpre = 0 if /<\/code><\/pre>/os; |
51 | 51 | print $_;
|
52 | 52 | }
|
0 commit comments