Bug 1548: Update results handling for Annex B section (r+bterlson)

This commit is contained in:
Brent Baker 2013-06-07 07:05:37 -04:00
parent 0d01ab1c7f
commit 91bb82fb7e
4 changed files with 29 additions and 6 deletions

View File

@ -259,9 +259,12 @@ function Presenter() {
if(id == 0)
return globalSection;
var match = id.match(/\d+/g);
var match = id.match(/\d+|[A-F](?=\.)/g);
var section = globalSection;
if (match === null)
return section;
for(var i = 0; i < match.length; i++) {
if(typeof section.subsections[match[i]] !== "undefined") {
section = section.subsections[match[i]];
@ -358,7 +361,7 @@ function Presenter() {
for (var i = 0; i < nodes.length; i++) {
if (nodes[i].nodeName === "sec") {
subsection = new Section(parentSection, nodes[i].getAttribute('id'), nodes[i].getAttribute('name'));
parentSection.subsections[subsection.id.match(/\d+$/)] = subsection;
parentSection.subsections[subsection.id.match(/\d+$|[A-F]$/)] = subsection;
addSectionsFromXML(nodes[i].childNodes, subsection);
}
}

View File

@ -259,9 +259,12 @@ function Presenter() {
if(id == 0)
return globalSection;
var match = id.match(/\d+/g);
var match = id.match(/\d+|[A-F](?=\.)/g);
var section = globalSection;
if (match === null)
return section;
for(var i = 0; i < match.length; i++) {
if(typeof section.subsections[match[i]] !== "undefined") {
section = section.subsections[match[i]];
@ -358,7 +361,7 @@ function Presenter() {
for (var i = 0; i < nodes.length; i++) {
if (nodes[i].nodeName === "sec") {
subsection = new Section(parentSection, nodes[i].getAttribute('id'), nodes[i].getAttribute('name'));
parentSection.subsections[subsection.id.match(/\d+$/)] = subsection;
parentSection.subsections[subsection.id.match(/\d+$|[A-F]$/)] = subsection;
addSectionsFromXML(nodes[i].childNodes, subsection);
}
}

View File

@ -259,9 +259,12 @@ function Presenter() {
if(id == 0)
return globalSection;
var match = id.match(/\d+/g);
var match = id.match(/\d+|[A-F](?=\.)/g);
var section = globalSection;
if (match === null)
return section;
for(var i = 0; i < match.length; i++) {
if(typeof section.subsections[match[i]] !== "undefined") {
section = section.subsections[match[i]];
@ -358,7 +361,7 @@ function Presenter() {
for (var i = 0; i < nodes.length; i++) {
if (nodes[i].nodeName === "sec") {
subsection = new Section(parentSection, nodes[i].getAttribute('id'), nodes[i].getAttribute('name'));
parentSection.subsections[subsection.id.match(/\d+$/)] = subsection;
parentSection.subsections[subsection.id.match(/\d+$|[A-F]$/)] = subsection;
addSectionsFromXML(nodes[i].childNodes, subsection);
}
}

View File

@ -303,4 +303,18 @@
<sec id="15.12.3" name="stringify ( value [ , replacer [ , space ] ] )"/>
</sec>
</sec>
<sec id="B" name="Annex B (informative) Compatibility">
<sec id="B.1" name="Additional Syntax">
<sec id="B.1.1" name="Numeric Literals"/>
<sec id="B.1.2" name="String Literals"/>
</sec>
<sec id="B.2" name="Additional Properties">
<sec id="B.2.1" name="escape"/>
<sec id="B.2.2" name="unescape"/>
<sec id="B.2.3" name="String.prototype.substr"/>
<sec id="B.2.4" name="Date.prototype.getYear"/>
<sec id="B.2.5" name="Date.prototype.setYear"/>
<sec id="B.2.6" name="Date.prototype.toGMTString"/>
</sec>
</sec>
</esSpec>