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

Change subject: Linter: Provide name of stripped tag
......................................................................

Linter: Provide name of stripped tag

Change-Id: I54c637940a95b7364c0c34e9a3849cbef5fbe00f
---
M lib/wt2html/pp/handlers/linter.js
M tests/mocha/linter.js
2 files changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/lib/wt2html/pp/handlers/linter.js 
b/lib/wt2html/pp/handlers/linter.js
index 39624e1..8ca1f3c 100644
--- a/lib/wt2html/pp/handlers/linter.js
+++ b/lib/wt2html/pp/handlers/linter.js
@@ -116,7 +116,7 @@
        }
 
        if (DU.isMarkerMeta(c, 'mw:Placeholder/StrippedTag')) {
-               lintObj = { dsr: dsr, templateInfo: templateInfo };
+               lintObj = { dsr: dsr, templateInfo: templateInfo, params: { 
name: dp.name } };
                env.log('lint/stripped-tag', lintObj);
        }
 
diff --git a/tests/mocha/linter.js b/tests/mocha/linter.js
index 80e036b..b6e78ae 100644
--- a/tests/mocha/linter.js
+++ b/tests/mocha/linter.js
@@ -51,6 +51,8 @@
                        return parseWT('foo</div>').then(function(result) {
                                result.should.have.length(1);
                                result[0].should.have.a.property("type", 
"stripped-tag");
+                               result[0].should.have.a.property("params");
+                               result[0].params.should.have.a.property("name", 
"DIV");
                                result[0].dsr.should.deep.equal([ 3, 9, null, 
null ]);
                        });
                });
@@ -58,6 +60,8 @@
                        return 
parseWT('{{1x|<div>foo</div></div>}}').then(function(result) {
                                result.should.have.length(1);
                                result[0].should.have.a.property("type", 
"stripped-tag");
+                               result[0].should.have.a.property("params");
+                               result[0].params.should.have.a.property("name", 
"DIV");
                                result[0].dsr.should.deep.equal([ 0, 27, null, 
null ]);
                        });
                });

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I54c637940a95b7364c0c34e9a3849cbef5fbe00f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry <ssas...@wikimedia.org>

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

Reply via email to