diff --git a/console/harness/helper.js b/console/harness/helper.js index 04c6cb6b72a3768918397bd2f6bae2db29177833..982400def87e27d38126e8ab0351213723e4d384 100644 --- a/console/harness/helper.js +++ b/console/harness/helper.js @@ -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); } } diff --git a/test/harness/helper.js b/test/harness/helper.js index 04c6cb6b72a3768918397bd2f6bae2db29177833..982400def87e27d38126e8ab0351213723e4d384 100644 --- a/test/harness/helper.js +++ b/test/harness/helper.js @@ -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); } } diff --git a/website/harness/helper.js b/website/harness/helper.js index 04c6cb6b72a3768918397bd2f6bae2db29177833..982400def87e27d38126e8ab0351213723e4d384 100644 --- a/website/harness/helper.js +++ b/website/harness/helper.js @@ -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); } } diff --git a/website/metadata/ecma-262-toc.xml b/website/metadata/ecma-262-toc.xml index 72c567eafcddeffc2fafbd4b1ed9918a09141aca..bd9e9906704e47ad110a75b3ec1e27ba7854e32a 100644 --- a/website/metadata/ecma-262-toc.xml +++ b/website/metadata/ecma-262-toc.xml @@ -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> \ No newline at end of file