* Got rid of unnecessary/buggy concat of EOFTk in ext.Cite.js
to wikitext string (concat is only required when processing
a token array from stage 2 onwards).
* Moved temporary node.data.parsoid.wrapper flag to a tmp object
which is then stripped in the cleanup pass. Other temporary
flags from other passes could also be moved here.
* Added a helper to test if a typeOf has a parsoid-generated
value.
Change-Id: I2024c575b5293e5155fc8e2915a34b5fb8394671
* Added mechanism to parse a set of tokens in its own parsing
scope all the way to DOM (which in turn restricts token
transformations to just that scope). This is equivalent to
enforcing well-balanced requirements in restricted contexts
(Ex: link content, image captions for starters). This also
provides an option of enforcing balanced templates in certain
contexts.
This patch applies it to link content and image captions.
Deleted the hacky closeUnclosedBlockTags code for dealing
with bad HTML in captions.
* Refactored common/duplicate code out of Cite handler and
Template handler.
* Updated DSR handling for dom-fragments which eliminates the
warnings about cs/s dsr mismatches seen on image reuse.
it:Dalmine used to get a bunch of DSR inconsistency warnings
when dom-fragments were reused (reported in bug 53071) and
are now fixed with this patch.
* There is still one big hole in DOM fragment unpacking that
has to be fixed. This pertains to improper tag nesting that
will be broken up by the tree builder. The DOM fragment unpacker
has to recognize these scenarios and fix up the DOM (either
by fixing up the final DOM or by stripping mis-nested tags
in the DOM fragment being unpacked).
This patch has an incomplete hack for this that addresses
the common-use case of nested a-tags generated by wikitext
of this form: "[http://foo.bar a [[Wikilink] here]".
Bug: 54454
Bug: 49942
Bug: 44476
Bug: 47326
Change-Id: I33ee38bc43743125b705ac821b339586593dbef7
* This eliminates repetitive code from a few places and might be
useful for future patches as well.
Change-Id: I383ed253a2fa20c1b7429689d17cde176751e29a
For a value of the incorrect type, the type in question is a
relevant part of the error message.
Follows-up Ie0271de755a63fcda8a3671cc115af7bc931a02b.
Change-Id: I09d9f1975bdfabffe44a6f69b5296cdcbf03a51e
Test, rather. It does more harm than good, making Cite annoying to
test in isolation (breaking on WMF jenkins setup) and doesn't really
add much value. The clearState() behavior fixed per bug 20748 should
be tested with a regular PHPUnit test, if anything.
Bug: 54126
Change-Id: I6b65ef7280f95a537f25b7f5c9e57434c21357dd
Had to do that in JavaScript as doing it server-side would have
made refactoring large parts of the extension necessary.
Bug: 38141
Change-Id: I60ecd2fc0edf2aee89974d8069cc0b075cda3f93
Moved the scripts and the CSS into the modules folder directly
(like almost all other extensions do), added a .jshintrc to not have
jenkins shout at this change and minor stuff.
After this change Cite will no longer work with anything older than
PHP 5.3!
Change-Id: I1c87af794f2a9894fb0d82a5bd97bd2182f028e1