|
@@ 423-433 (lines=11) @@
|
| 420 |
|
} |
| 421 |
|
|
| 422 |
|
// Trim trailing blanks preceding <br> in RTL text |
| 423 |
|
while (true) { |
| 424 |
|
if (strpos($result, ' <RTLbr>') !== false) { |
| 425 |
|
$result = str_replace(' <RTLbr>', '<RTLbr>', $result); |
| 426 |
|
continue; |
| 427 |
|
} |
| 428 |
|
if (strpos($result, ' <RTLbr>') !== false) { |
| 429 |
|
$result = str_replace(' <RTLbr>', '<RTLbr>', $result); |
| 430 |
|
continue; |
| 431 |
|
} |
| 432 |
|
break; // Neither space nor : we're done |
| 433 |
|
} |
| 434 |
|
|
| 435 |
|
// Convert '<LTRbr>' and '<RTLbr /' |
| 436 |
|
$result = str_replace(['<LTRbr>', '<RTLbr>'], [self::$endLTR . '<br>' . self::$startLTR, self::$endRTL . '<br>' . self::$startRTL], $result); |
|
@@ 899-910 (lines=12) @@
|
| 896 |
|
|
| 897 |
|
// We're done: finish the span |
| 898 |
|
$textSpan = self::starredName($textSpan, 'LTR'); // Wrap starred name in <u> and </u> tags |
| 899 |
|
while (true) { |
| 900 |
|
// Remove blanks that precede <LTRbr> |
| 901 |
|
if (strpos($textSpan, ' <LTRbr>') !== false) { |
| 902 |
|
$textSpan = str_replace(' <LTRbr>', '<LTRbr>', $textSpan); |
| 903 |
|
continue; |
| 904 |
|
} |
| 905 |
|
if (strpos($textSpan, ' <LTRbr>') !== false) { |
| 906 |
|
$textSpan = str_replace(' <LTRbr>', '<LTRbr>', $textSpan); |
| 907 |
|
continue; |
| 908 |
|
} |
| 909 |
|
break; |
| 910 |
|
} |
| 911 |
|
if ($leadingSeparator != '') { |
| 912 |
|
$result = $result . self::$startLTR . $leadingSeparator . self::$endLTR; |
| 913 |
|
} |