Subramanya Sastry has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402094 )

Change subject: Don't emit missing-end-tag warnings for builder-inserted tags
......................................................................

Don't emit missing-end-tag warnings for builder-inserted tags

* These have both auto-inserted start and end set. There is no
  useful information conveyed to editors by these lint errors.

  This also has the benefit of suppressing the false positive
  multiple-unclosed-formatting-tags errors without more state.

Change-Id: I5e5b77af8b7e2b3d2fc41f56d9a32c41c32f9568
---
M lib/wt2html/pp/processors/linter.js
1 file changed, 2 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/94/402094/1

diff --git a/lib/wt2html/pp/processors/linter.js 
b/lib/wt2html/pp/processors/linter.js
index 1394fab..8339b4c 100644
--- a/lib/wt2html/pp/processors/linter.js
+++ b/lib/wt2html/pp/processors/linter.js
@@ -351,11 +351,8 @@
                                        }
                                        adjDp.tmp.linted = true;
                                        env.log('lint/misnested-tag', lintObj);
-                               } else if (!endTagOptional(c)) {
+                               } else if (!endTagOptional(c) && 
!dp.autoInsertedStart) {
                                        lintObj.params.inTable = 
DU.hasAncestorOfName(c, 'TABLE');
-                                       if (dp.autoInsertedStart) {
-                                               lintObj.params.aiStart = true;
-                                       }
                                        env.log('lint/missing-end-tag', 
lintObj);
                                        if 
(Consts.HTML.FormattingTags.has(c.nodeName) && matchedOpenTagPairExists(c, dp)) 
{
                                                
env.log('lint/multiple-unclosed-formatting-tags', lintObj);
@@ -762,7 +759,7 @@
        var multiUnclosedTagName = null;
        lints.find(function(item) {
                // Unclosed tags in tables don't leak out of the table
-               if (item.type === 'missing-end-tag' && !item.params.aiStart && 
!item.params.inTable) {
+               if (item.type === 'missing-end-tag' && !item.params.inTable) {
                        if (item.params.name === 'small' || item.params.name 
=== 'big') {
                                var tagName = item.params.name;
                                if (!firstUnclosedTag[tagName]) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5e5b77af8b7e2b3d2fc41f56d9a32c41c32f9568
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to