jenkins-bot has submitted this change and it was merged.
Change subject: Remove some dead code from parser.defines
......................................................................
Remove some dead code from parser.defines
* Noticed in coveralls
Change-Id: Iddc24162f171f29d33192a33e014b1bd84dbc953
---
M lib/mediawiki.parser.defines.js
1 file changed, 0 insertions(+), 60 deletions(-)
Approvals:
Subramanya Sastry: Looks good to me, approved
jenkins-bot: Verified
diff --git a/lib/mediawiki.parser.defines.js b/lib/mediawiki.parser.defines.js
index f61eea4..2ed0269 100644
--- a/lib/mediawiki.parser.defines.js
+++ b/lib/mediawiki.parser.defines.js
@@ -200,38 +200,6 @@
/**
* @member Token
*
- * Set an attribute to a value, and shadow it if it was already set
- *
- * @param {string} name
- * @param {Mixed} value
- */
- setShadowedAttribute: function(name, value) {
- var out = [];
- var found = false;
- for (var i = this.attribs.length - 1; i >= 0; i--) {
- var kv = this.attribs[i];
- if (kv.k.toLowerCase() !== name) {
- out.push(kv);
- } else if (!found) {
- if (!this.dataAttribs.a ||
- this.dataAttribs.a[name] ===
undefined) {
- this.setShadowInfo(name, value, kv.v);
- }
- kv.v = value;
- found = true;
- }
- // else strip it..
- }
- out.reverse();
- if (!found) {
- out.push(new KV(name, value));
- }
- this.attribs = out;
- },
-
- /**
- * @member Token
- *
* Add a space-separated property value
*
* @param {string} name
@@ -267,34 +235,6 @@
*/
isHTMLTag: function() {
return this.dataAttribs.stx === 'html';
- },
-
- /**
- * @member Token
- *
- * Clone a token.
- *
- * @param {boolean} cloneAttribs Whether to clone attributes too.
- * @return {Token}
- */
- clone: function(cloneAttribs) {
- requireUtil();
- if (cloneAttribs === undefined) {
- cloneAttribs = true;
- }
-
- // create a new object with the same prototype as this, then
copy
- // our own-properties into the new object.
- var myClone =
-
Object.assign(Object.create(Object.getPrototypeOf(this)), this);
- if (cloneAttribs) {
- myClone.attribs = [];
- for (var i = 0, n = this.attribs.length; i < n; i++) {
-
myClone.attribs.push(Util.clone(this.attribs[i]));
- }
- myClone.dataAttribs = Util.clone(this.dataAttribs);
- }
- return myClone;
},
/**
--
To view, visit https://gerrit.wikimedia.org/r/246077
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iddc24162f171f29d33192a33e014b1bd84dbc953
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra <[email protected]>
Gerrit-Reviewer: Cscott <[email protected]>
Gerrit-Reviewer: Subramanya Sastry <[email protected]>
Gerrit-Reviewer: Tim Starling <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits