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

Change subject: Add explanation in cleanup.js
......................................................................

Add explanation in cleanup.js

Change-Id: I04f064fafb3b0956353744c09b45235910da4e63
---
M lib/wt2html/pp/handlers/cleanup.js
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/lib/wt2html/pp/handlers/cleanup.js 
b/lib/wt2html/pp/handlers/cleanup.js
index 2fd3747..d588ec8 100644
--- a/lib/wt2html/pp/handlers/cleanup.js
+++ b/lib/wt2html/pp/handlers/cleanup.js
@@ -98,6 +98,11 @@
 
        // Remove dp.src from elements that have valid data-mw and dsr.
        // This should reduce data-parsoid bloat.
+       //
+       // Presence of data-mw is a proxy for us knowing how to serialize
+       // this content from HTML. Token handlers should strip src for
+       // content where data-mw isn't necessary and html2wt knows how to
+       // handle the HTML markup.
        var validDSR = DU.validDataMw(node) && Util.isValidDSR(dp.dsr);
        var isPageProp = (node.nodeName === 'META' &&
                        
/^mw\:PageProp\/(.*)$/.test(node.getAttribute('property')));

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I04f064fafb3b0956353744c09b45235910da4e63
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