mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-24 06:54:00 +00:00
Use TokenStreamPatcher to convert table tags outside wikitables to text
* Keep track of table nesting in token stream patcher and use it to convert <td>, <tr>, and <th> 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 <nowiki> wrappers. Bug: 66489 Bug: 66498 Change-Id: I9f42354ea9efb0f8adfc96c23760012220d00dd4
This commit is contained in:
parent
7db2d118dc
commit
e59aaecbcf
|
@ -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 );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue