Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/195543
Change subject: References: Support data-mw.body.html method also ...................................................................... References: Support data-mw.body.html method also Support the old way of references genrated by parsoid. Change-Id: I7714386a5cbafab880bfa9d655d3594bec53ac81 Followup: If0e23faeaf Bug: T90776 --- M modules/tools/ext.cx.tools.reference.js 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/43/195543/1 diff --git a/modules/tools/ext.cx.tools.reference.js b/modules/tools/ext.cx.tools.reference.js index 264b81c..d9a23ae 100644 --- a/modules/tools/ext.cx.tools.reference.js +++ b/modules/tools/ext.cx.tools.reference.js @@ -87,7 +87,8 @@ /** * Get the reference content for the given reference Id. * The content is taken from the reference list section , linked - * by mw-data.body.id. See T88290 + * by mw-data.body.id. See T88290 and + * https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Ref_and_References * @param {string} referenceId The reference element Identifier. * @return {string} The HTML content of the reference. */ @@ -98,6 +99,10 @@ if ( !reference || !reference.body ) { return null; } + // Support traditional reference handling by Parsoid + if ( reference.body.html ) { + return reference.body.html; + } referenceContentElement = document.getElementById( reference.body.id ); return referenceContentElement && referenceContentElement.outerHTML; -- To view, visit https://gerrit.wikimedia.org/r/195543 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7714386a5cbafab880bfa9d655d3594bec53ac81 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits