diff --git a/console/harness/helper.js b/console/harness/helper.js index 04c6cb6b72..982400def8 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 04c6cb6b72..982400def8 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 04c6cb6b72..982400def8 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 72c567eafc..bd9e990670 100644 --- a/website/metadata/ecma-262-toc.xml +++ b/website/metadata/ecma-262-toc.xml @@ -303,4 +303,18 @@ + + + + + + + + + + + + + + \ No newline at end of file