wiki.techinc.nl/includes/diff
Tim Starling 5d26080d62 Fix Chinese diff segmentation
segmentForDiff() is supposed to allow character-level diffing of Chinese
text, by adding spaces and then removing them after the diff is
complete. But when I tested it for I2d0a6996b02d37a3, unsegmentForDiff()
failed to remove the spaces, since there was an <ins> tag between the space
and the Chinese character.

So instead, use formfeed characters to separate the Chinese characters,
and strip them unconditionally instead of relying on them being next to
Chinese characters.

Add test.

Change-Id: I230d8261bbda34ad313785a1f7c31d4db7bf989b
2023-07-06 18:14:30 +10:00
..
Hook diff: Move SlotDiffRenderer::getTablePrefix() parts assembly up to DifferenceEngine 2023-06-26 11:28:59 +10:00
DifferenceEngine.php Inject page language into TextSlotDiffRenderer 2023-07-06 10:35:03 +10:00
DifferenceEngineSlotDiffRenderer.php build: Update mediawiki/mediawiki-phan-config to 0.12.0 2022-10-08 15:45:42 +02:00
IncompatibleDiffTypesException.php Improve handling of diffs between incompatible content models 2023-06-23 19:09:59 +00:00
SlotDiffRenderer.php Merge "diff: Move SlotDiffRenderer::getTablePrefix() parts assembly up to DifferenceEngine" 2023-06-26 03:13:42 +00:00
TextSlotDiffRenderer.php Fix Chinese diff segmentation 2023-07-06 18:14:30 +10:00
UnsupportedSlotDiffRenderer.php Reorg: Move HTML-related classes out of includes/ to Html/ 2023-02-16 20:40:01 +01:00