aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/diff/TextSlotDiffRendererTest.php
diff options
context:
space:
mode:
authorDaimona Eaytoy <daimona.wiki@gmail.com>2021-09-16 15:47:16 +0200
committerDaimona Eaytoy <daimona.wiki@gmail.com>2021-09-17 22:58:44 +0000
commit25e10bb38a00dcd037fee468bf115c7a32552142 (patch)
tree2d89f561a49a80fea60d7190364e50daf0c0baaa /tests/phpunit/includes/diff/TextSlotDiffRendererTest.php
parentbea70565d96a88948b99fa657657b69f3c6df97a (diff)
downloadmediawikicore-25e10bb38a00dcd037fee468bf115c7a32552142.tar.gz
mediawikicore-25e10bb38a00dcd037fee468bf115c7a32552142.zip
Rename diff-related classes for LTR compatibility
Nothing in the code expects things to be on the left/right, it was just a naming convention. However, it caused some issues because CSSJanus flips the attributes in the stylesheet for RTL languages. So just use more descriptive names that also avoid issues with RTL languages. Bug: T290731 Change-Id: I8a383cd1e3981dc8a826ff60eee523d9f71d1d3d
Diffstat (limited to 'tests/phpunit/includes/diff/TextSlotDiffRendererTest.php')
-rw-r--r--tests/phpunit/includes/diff/TextSlotDiffRendererTest.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/phpunit/includes/diff/TextSlotDiffRendererTest.php b/tests/phpunit/includes/diff/TextSlotDiffRendererTest.php
index fb08b22a1233..917ac0a1cbe0 100644
--- a/tests/phpunit/includes/diff/TextSlotDiffRendererTest.php
+++ b/tests/phpunit/includes/diff/TextSlotDiffRendererTest.php
@@ -114,7 +114,7 @@ class TextSlotDiffRendererTest extends MediaWikiIntegrationTestCase {
];
// Preserve markers when stripping tags
$diff = str_replace( '<td class="diff-marker"></td>', ' ', $diff );
- $diff = preg_replace( '@<td colspan="2"( class="diff-[a-z]+")?></td>@', ' ', $diff );
+ $diff = preg_replace( '@<td colspan="2"( class="(?:diff-side-deleted|diff-side-added)")?></td>@', ' ', $diff );
$diff = preg_replace( '/data-marker="([^"]*)">/', '>$1', $diff );
return str_replace( array_keys( $replacements ), array_values( $replacements ),
trim( strip_tags( $diff ), "\n" ) );