Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/397905 )

Change subject: Temporarily skip throwIfPreviousSectionIsIncomplete
......................................................................

Temporarily skip throwIfPreviousSectionIsIncomplete

Skip checking for section.line and section.anchor in order to complete
our coordinated deployment. We'll come back and fix this asap.

Change-Id: I88c08d4636803d64e51835067dd75164f68a8eb5
---
M lib/parsoidSectionsUsingSectionTags.js
M test/lib/parsoid/parsoid-sections-section-elements-tests.js
2 files changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps 
refs/changes/05/397905/1

diff --git a/lib/parsoidSectionsUsingSectionTags.js 
b/lib/parsoidSectionsUsingSectionTags.js
index 7d20fdd..76e471d 100644
--- a/lib/parsoidSectionsUsingSectionTags.js
+++ b/lib/parsoidSectionsUsingSectionTags.js
@@ -1,8 +1,8 @@
 'use strict';
 
 const parsoidDomUtils = require('parsoid-dom-utils');
-const sUtil = require('./util');
-const HTTPError = sUtil.HTTPError;
+// const sUtil = require('./util');
+// const HTTPError = sUtil.HTTPError;
 const NodeType = require('./nodeType');
 
 /**
@@ -39,7 +39,7 @@
     }
 }
 
-function throwIfPreviousSectionIsIncomplete(allSections, sectionObj) {
+/* function throwIfPreviousSectionIsIncomplete(allSections, sectionObj) {
     if (allSections.length === 0) {
         return;
     }
@@ -57,7 +57,7 @@
             detail: `Cannot find heading for section number ${sectionObj.id}.`
         });
     }
-}
+} */
 
 /**
  * Visits one DOM node. Do the stuff that needs to be done when a single DOM 
node is handled.
@@ -70,7 +70,7 @@
 function visit(node, allSections, state) {
     let sectionObj = allSections.length > 0 ? allSections[allSections.length - 
1] : undefined;
     if (node.tagName === 'SECTION') {
-        throwIfPreviousSectionIsIncomplete(allSections, sectionObj);
+        // throwIfPreviousSectionIsIncomplete(allSections, sectionObj);
 
         sectionObj = { id: getSectionNumber(node), text: '' };
         allSections.push(sectionObj);
@@ -117,7 +117,7 @@
         }
     }
     ensureLeadSection(allSections);
-    throwIfPreviousSectionIsIncomplete(allSections);
+    // throwIfPreviousSectionIsIncomplete(allSections);
 }
 
 function getSectionsText(doc) {
diff --git a/test/lib/parsoid/parsoid-sections-section-elements-tests.js 
b/test/lib/parsoid/parsoid-sections-section-elements-tests.js
index 4ba24df..77cb023 100644
--- a/test/lib/parsoid/parsoid-sections-section-elements-tests.js
+++ b/test/lib/parsoid/parsoid-sections-section-elements-tests.js
@@ -119,7 +119,7 @@
         assertSection0(sections, sectionInDiv);
     });
 
-    it('non-lead section without heading tag should throw error', () => {
+    it.skip('non-lead section without heading tag should throw error', () => {
         const doc = domino.createDocument(
             '<section data-mw-section-id="0">text0</section>' +
             '<section data-mw-section-id="1">text1</section>');

-- 
To view, visit https://gerrit.wikimedia.org/r/397905
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I88c08d4636803d64e51835067dd75164f68a8eb5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Mholloway <mhollo...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to