jenkins-bot has submitted this change and it was merged.
Change subject: Removed dead code in attribute expander
......................................................................
Removed dead code in attribute expander
Change-Id: I8ca449938d1c05fbe74cf29e2551891cfba5b38d
---
M lib/ext.core.AttributeExpander.js
1 file changed, 4 insertions(+), 14 deletions(-)
Approvals:
Cscott: Looks good to me, approved
jenkins-bot: Verified
diff --git a/lib/ext.core.AttributeExpander.js
b/lib/ext.core.AttributeExpander.js
index cc1bf4e..c0bdc53 100644
--- a/lib/ext.core.AttributeExpander.js
+++ b/lib/ext.core.AttributeExpander.js
@@ -15,17 +15,12 @@
SelfclosingTagTk = defines.SelfclosingTagTk;
/* ----------------------------------------------------------
- * This helper method does two different things:
- *
- * 1. Strips all meta tags (introduced by transclusions, etc)
- * 2. In wrap-template mode, it identifies the meta-object type
- * and returns it.
+ * This helper method strips all meta tags introduced by
+ * transclusions, etc. and returns the content.
* ---------------------------------------------------------- */
function stripMetaTags( tokens, wrapTemplates ) {
- var isPushed, buf = [],
- hasGeneratedContent = false,
- inTpl = false,
- inInclude = false;
+ var isPushed = false, buf = [],
+ hasGeneratedContent = false;
for (var i = 0, l = tokens.length; i < l; i++) {
var token = tokens[i];
@@ -38,12 +33,7 @@
var typeMatch = t &&
t.match(/(mw:(Transclusion|Param|Extension|Includes\/)(.*)?$)/);
if (typeMatch) {
if (!typeMatch[1].match(/\/End$/)) {
- inTpl =
typeMatch[1].match(/Transclusion|Param|Extension/);
- inInclude = !inTpl;
hasGeneratedContent = true;
- } else {
- inTpl = false;
- inInclude = false;
}
} else {
isPushed = true;
--
To view, visit https://gerrit.wikimedia.org/r/177190
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I8ca449938d1c05fbe74cf29e2551891cfba5b38d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry <[email protected]>
Gerrit-Reviewer: Arlolra <[email protected]>
Gerrit-Reviewer: Cscott <[email protected]>
Gerrit-Reviewer: Marcoil <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits