From b7a9d7e9a9dac200547c78d6194b13268a709959 Mon Sep 17 00:00:00 2001 From: Denis Ah-Kang Date: Fri, 5 Feb 2016 15:38:30 +0400 Subject: [PATCH] fix SotD detection after the 2016 TR design Fix #290 --- lib/validator.js | 5 +++-- test/docs/headers/simple.html | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/validator.js b/lib/validator.js index 59121c445..98bb94a19 100644 --- a/lib/validator.js +++ b/lib/validator.js @@ -194,7 +194,9 @@ Specberus.prototype.getSotDSection = function () { , $ = this.$ , $div = $("
") , self = this + , $nav = $("nav#toc") ; + $("h2").each(function () { var $h2 = $(this); if ($startH2) { @@ -211,7 +213,7 @@ Specberus.prototype.getSotDSection = function () { return; } if (!started) return; - if ($endH2[0] === this) return false; + if ($endH2[0] === this || $nav[0] === this) return false; $div.append($(this).clone()); }); this.sotdSection = $div.children(); @@ -269,4 +271,3 @@ Specberus.prototype.transition = function (options) { } exports.Specberus = Specberus; - diff --git a/test/docs/headers/simple.html b/test/docs/headers/simple.html index da912eefb..723c9c917 100644 --- a/test/docs/headers/simple.html +++ b/test/docs/headers/simple.html @@ -80,9 +80,9 @@

Status of This Document

-