Subramanya Sastry has uploaded a new change for review.
https://gerrit.wikimedia.org/r/79072
Change subject: Minor: Removed dead code
......................................................................
Minor: Removed dead code
Change-Id: I177d1e1ce2c1dc9e3666996e120b46811c3f6e55
---
M js/lib/mediawiki.Util.js
1 file changed, 0 insertions(+), 30 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid
refs/changes/72/79072/1
diff --git a/js/lib/mediawiki.Util.js b/js/lib/mediawiki.Util.js
index 6618a03..f1e5496 100644
--- a/js/lib/mediawiki.Util.js
+++ b/js/lib/mediawiki.Util.js
@@ -821,36 +821,6 @@
}
};
-/**
- * @method
- *
- * Utility function for stripping useless paragraphs from the beginning of a
list item,
- * because they get appended by VisualEditor sometimes.
- */
-Util.stripFirstParagraph = function ( node ) {
- var thisnode, hasAttrs, dataParsoid, attrs, exemptAttrs = 0;
- for ( var i = 0; i < node.childNodes.length; i++ ) {
- thisnode = node.childNodes[i];
- exemptAttrs += Util.getJSONAttribute( thisnode,
'data-ve-changed' ) ? 1 : 0;
- exemptAttrs += Util.getJSONAttribute( thisnode,
'data-parsoid-changed' ) ? 1 : 0;
- dataParsoid = Util.getJSONAttribute( thisnode, 'data-parsoid' );
- exemptAttrs += dataParsoid ? 1 : 0;
- attrs = thisnode.attributes;
- hasAttrs = ( attrs && attrs.length && attrs.length -
exemptAttrs ) > 0;
- if ( ( node.tagName || '' ).toLowerCase() === 'li' && i < 1 &&
!hasAttrs &&
- ( !dataParsoid || !dataParsoid.stx ||
dataParsoid.stx !== 'html' ) &&
- ( thisnode.tagName || '' ).toLowerCase() ===
'p' ) {
- for ( var j = 0; j < thisnode.childNodes.length; j++ ) {
- node.insertBefore(
thisnode.childNodes[j].cloneNode(), thisnode );
- }
- node.removeChild( thisnode );
- i--;
- } else {
- Util.stripFirstParagraph( thisnode );
- }
- }
-};
-
// FIXME: There is also a DOMUtils.getJSONAttribute. Consolidate
Util.getJSONAttribute = function ( node, attr, fallback ) {
fallback = fallback || null;
--
To view, visit https://gerrit.wikimedia.org/r/79072
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I177d1e1ce2c1dc9e3666996e120b46811c3f6e55
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits