Commit graph

8 commits

Author SHA1 Message Date
Subramanya Sastry a8a6951f9c Bump Parsoid/JS version to 0.11.0 for deb package release
Change-Id: I2f5df42fe7d8275f0a3d4d77cd4cd410f76e9974
2020-01-11 13:43:13 +05:30
Subramanya Sastry ad229c1ac0 One more fix for T235656
It is about time to implement a generic fix for T214994 which will
capture the Cite-specific scenario we are tackling here in bits
and pieces. We have fragments of a T214994 solution spread in
Utils/ and here while tackling shiftDSR and convertOffsets
for Parsoid/PHP. So, someone needs to take a look at all these
pieces and implement the necessary abstraction.

As part of that, maybe we also need to revisit our embedded HTML
data-* representation so there is a uniform way to inspect these
attributes rather than every semantic element (template, extensions,
lang variants, media) choosing their own custom embedding scheme
which makes discoverability harder and error-prone.

Change-Id: Ifd19d2d8d20dbd0dda0fa1cc338a07afb37c4213
2019-11-06 14:03:29 -06:00
C. Scott Ananian d55a8db4e4 Clean up typeOf matching in Cite extension
Change-Id: I88388a2120cc1bd79ef7ec5de3c40e93db22844f
2019-11-04 20:08:33 +00:00
Subramanya Sastry 965203b301 Process <ref>s found in nodes with mw:ExpandedAttrs typeof
* This is an instance of a bigger issue that we need to look closely
  when we are integrating Parsoid with core parser.

Bug: T235656
Change-Id: I3d652727293461c7968e83be8994ba0572bae8e4
2019-10-29 21:52:09 +00:00
C. Scott Ananian b84b71af22 Gallery: shift TSRs in the DOM, rather than fibbing about srcOffset
Passing srcOffsets which don't actually correspond to actual regions of
the source wikitext cause problems in the token offset conversion code.
Instead, parse the wikitext as itself, then adjust the TSRs in the DOM
tree.

Since Gallery isn't ported to PHP (yet), update the
automatically-generated Gallery/index.php.  The newly-added
ContentUtils::shiftDSR() was ported, however.

Change-Id: I28f3d3398930733ae2bcf9759e49c45f93bc7190
2019-06-28 14:10:16 +00:00
Subramanya Sastry 04efa43c4c s/typeOf/typeof in various files
- git grep is a wonderful thing to help catch identical errors.
- Saw this "bug" first in the cite extension port.
- Turns out this is only a bug on the PHP side since the PHP DOM
  treats attributes in a case-sensitive manner but Domino.js
  treats attributes in a case-insensitive manner.
- Better to use the correct attribute name everywhere.

Change-Id: I3735dc768a10a820b4816c211aa72291df9b1413
2019-06-20 11:46:07 -05:00
Subramanya Sastry f5c8aacc6e Cite lint handler: Use nextSibling instead of nextNode
* Not sure why nextNode was used in the first place, possibly
  some oversight?

Change-Id: Ied76591947bb7505c59b9a11589a19b13dc58790
2019-05-28 17:30:10 +00:00
Arlo Breault 20c627e3f4 Convert cite extension to es6 class structure
Also, runs js2php on these files.

Change-Id: Id8ee13ad536d75f63e0045a21fdfdb667a0df65d
2019-04-03 12:20:41 -04:00