From e59aaecbcfaa61d8e412aa1beb1cc8dbd85f45af Mon Sep 17 00:00:00 2001 From: Subramanya Sastry Date: Mon, 16 Jun 2014 12:30:25 -0500 Subject: [PATCH] Use TokenStreamPatcher to convert table tags outside wikitables to text * Keep track of table nesting in token stream patcher and use it to convert , , and tags to plain strings. * This fix is only enabled on the top-level token stream. To support this, fixed the resetState function in the parser construction code to pass in a toplevel flag which lets the token stream patcher know the context it is in. * Fixes 29 (wt2html,wt2wt,html2html,selser) tests and improves results of 1 previously blacklisted tests. The failing selser test is actually a false failure because selser is more accurate than non-selser wts. * Consolidated a few separate tests into a single test that covers all this functionality. - This new test fails wt2wt and html2wt modes because serializer uses tokenizer information which continues to return table tokens and results in wrappers. Bug: 66489 Bug: 66498 Change-Id: I9f42354ea9efb0f8adfc96c23760012220d00dd4 --- lib/ext.Cite.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ext.Cite.js b/lib/ext.Cite.js index 1e002c5ee..326979b20 100644 --- a/lib/ext.Cite.js +++ b/lib/ext.Cite.js @@ -469,8 +469,8 @@ var Cite = function() { this.references = new References(this); }; -Cite.prototype.resetState = function(inSubPipeline) { - if (!inSubPipeline) { +Cite.prototype.resetState = function(opts) { + if (opts && opts.toplevel) { this.ref.reset(); this.references.reset( null, true ); }