Subramanya Sastry has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/60378


Change subject: Bug 47518: Reset refs after references; correctly handle tpls 
in exts
......................................................................

Bug 47518: Reset refs after references; correctly handle tpls in exts

* Refs were not being reset after references tag was being processed.
  This code was commented out with a FIXME. The reason this was and
  is still not entirely fixed is because of an unrelated async issue
  which will be addressed in a later patch. But, refs should always
  be reset after references tag is processed.

* This change should take care of the bug with refs index not starting
  at 1.

* Also, pipelines processing template transclusions should propagate
  the extension tag if the transclusion showed up in the context of
  extension source so that any extension-specific constraints are
  respected. (Ex: ref-tags in reference-extension context are handled
  differently -- and this should continue to be true even when the
  tags show up via transcluded content)

Change-Id: I47ac2c0e73331bb6829427d58138984337df14e0
---
M js/lib/ext.Cite.js
M js/lib/ext.core.TemplateHandler.js
2 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid 
refs/changes/78/60378/1

diff --git a/js/lib/ext.Cite.js b/js/lib/ext.Cite.js
index b49b088..ee59e70 100644
--- a/js/lib/ext.Cite.js
+++ b/js/lib/ext.Cite.js
@@ -321,9 +321,8 @@
                // All done!
                cb({ tokens: [placeHolder], async: false });
 
-               // FIXME: This is somehow buggy -- needs investigation
                // Reset refs after references token is processed
-               // cite.ref.resetState();
+               cite.resetState();
        };
 
        processExtSource(manager, refsTok, {
diff --git a/js/lib/ext.core.TemplateHandler.js 
b/js/lib/ext.core.TemplateHandler.js
index 430b2cb..5a49c52 100644
--- a/js/lib/ext.core.TemplateHandler.js
+++ b/js/lib/ext.core.TemplateHandler.js
@@ -366,7 +366,8 @@
        // NOTE: No template wrapping required for nested templates.
        var pipelineOpts = {
                isInclude: true,
-               wrapTemplates: false
+               wrapTemplates: false,
+               extTag: this.options.extTag
        };
        var pipeline = this.manager.pipeFactory.getPipeline(
                                type || 'text/x-mediawiki', pipelineOpts

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

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

Reply via email to